-
Notifications
You must be signed in to change notification settings - Fork 1.9k
112 lines (88 loc) · 2.64 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: CI
on:
push:
branches: [master, v0.*]
pull_request:
branches: master
schedule:
- cron: '0 6 * * 1,4' # Each Monday and Thursday at 06:00 UTC
workflow_dispatch:
permissions:
contents: read
env:
NB_KERNEL: python
MPLBACKEND: Agg
SEABORN_DATA: ${{ github.workspace }}/seaborn-data
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Setup Python 3.11
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: "3.11"
- name: Install seaborn
run: |
pip install --upgrade pip
pip install .[stats,docs]
- name: Install pandoc
run: |
sudo apt-get install pandoc
- name: Cache datasets
run: |
git clone https://github.com/mwaskom/seaborn-data.git
ls $SEABORN_DATA
- name: Build docs
env:
SPHINXOPTS: -j `nproc`
run: |
cd doc
make -j `nproc` notebooks
make html
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
install: [full]
deps: [latest]
include:
- python: "3.8"
install: full
deps: pinned
- python: "3.11"
install: light
deps: latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: ${{ matrix.python }}
- name: Install seaborn
run: |
pip install --upgrade pip wheel
if [[ ${{matrix.install}} == 'full' ]]; then EXTRAS=',stats'; fi
if [[ ${{matrix.deps }} == 'pinned' ]]; then DEPS='-r ci/deps_pinned.txt'; fi
pip install .[dev$EXTRAS] $DEPS
- name: Run tests
run: make test
- name: Upload coverage
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
if: ${{ success() }}
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Setup Python
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
- name: Install tools
run: pip install mypy flake8
- name: Flake8
run: make lint
- name: Type checking
run: make typecheck