-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (43 loc) · 1.35 KB
/
ci.yml
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
# tox enviroments that run on both pull requests and merge to main
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main, dev]
jobs:
test:
strategy:
# fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.11] # to minimise complexity we only test a min and a max version
include:
# on all platforms and versions do everything
- tox-envs: [lint, test, docs, build]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
# pandoc is required by nbsphinx for building the notebook-based docs
- name: Setup pandoc for building docs
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.19.2'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install tox
run: |
python -m pip install tox
- name: Run tox environments for testing
run: tox -e ${{ join(matrix.tox-envs, ',') }}
# from https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
#fail_ci_if_error: true
verbose: true