-
Notifications
You must be signed in to change notification settings - Fork 13
91 lines (73 loc) · 2.13 KB
/
test.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
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
name: Tests
on:
push:
branches:
- "main"
pull_request:
branches:
- '*'
jobs:
run-linters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
allow-prereleases: true
- name: Run the linters via pre-commit
run: |
python -m pip install pre-commit
pre-commit run --all-files
test-pypi:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: "3.9"
nox-session: test_oldest_from_pypi
- python-version: "3.9"
nox-session: test_latest_from_pypi
- python-version: "3.10"
nox-session: test_latest_from_pypi
- python-version: "3.11"
nox-session: test_latest_from_pypi
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Setup test env and run the tests
run: |
python -m pip install nox
nox -s ${{ matrix.nox-session }} -p ${{ matrix.python-version }}
# TODO: collect code coverage data and upload to codecov
test-conda-forge:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: "3.11"
nox-session: test_latest_from_conda_forge
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash
cache-environment: true
post-cleanup: 'all'
environment-name: nox-env
create-args: >-
python=${{ matrix.python-version }}
nox
mamba
- name: Setup test env and run the tests
run: |
nox -s ${{ matrix.nox-session }} -p ${{ matrix.python-version }}
shell: bash -el {0}
# TODO: collect code coverage data and upload to codecov