forked from bskinn/sphobjinv
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (80 loc) · 2.22 KB
/
ci_tests.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
92
93
94
95
96
97
98
99
100
name: ci-tests
on: push
jobs:
all_checks:
name: Run all tests, lints, etc. (Python 3.11)
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
requirements-ci.txt
requirements-flake8.txt
- name: Update pip & setuptools
run: python -m pip install -U pip setuptools
- name: Install & report CI dependencies
run: |
python -m pip install -U --force-reinstall -r requirements-ci.txt -r requirements-flake8.txt
python --version
pip list
- name: Build docs
run: |
cd doc
make html
mkdir scratch
- name: Run tests & report source coverage
run: |
pytest --cov --testall --nonloc
tox -e sdist_install
- name: Run doctests
run: |
cd doc
make doctest
- name: Run docs link check
run: |
cd doc
make linkcheck
- name: Lint code
run: tox -e flake8
- name: Transmit to Codecov
run: codecov
just_tests:
name: Run only the test suite
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.12']
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: |
requirements-ci.txt
requirements-flake8.txt
- name: Update pip & setuptools
run: python -m pip install -U pip setuptools
- name: Install & report CI dependencies
run: |
python -m pip install -U --force-reinstall -r requirements-ci.txt
python --version
pip list
- name: Build docs
run: |
cd doc
make html
mkdir scratch
- name: Run tests & report source coverage
run: |
pytest --cov --testall --nonloc
tox -e sdist_install