-
Notifications
You must be signed in to change notification settings - Fork 11
72 lines (72 loc) · 1.96 KB
/
tests.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
name: run tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
hal-cgp-testsuite:
name: hal-cgp testsuite
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
dep: ['[all]', '[dev]']
exclude:
- python-version: 3.7
dep: "[dev]"
- python-version: 3.8
dep: "[dev]"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
requirements.txt
extra-requirements.txt
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: Install library and dependencies
env:
DEP: ${{ matrix.dep }}
run: |
pip --version
pip install --upgrade -e .$DEP
pip install --upgrade pytest-cov coveralls
- name: Run code checks (black)
run: |
black --version
black --check .
- name: Run code checks (flake8)
run: |
flake8 --version
flake8 --config=.flake8 .
- name: Run code checks (mypy)
run: |
mypy --version
mypy cgp
- name: Run code checks (isort)
run: |
isort --version
isort --check-only cgp examples test
- name: Run tests
run: |
pytest --version
pytest --cov=cgp
- name: Build documentation
run: |
make -C docs/ html-examples-short
if: matrix.python-version == 3.8 && matrix.dep == '[all]'
- name: Run coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Test suite
if: matrix.python-version == 3.8 && matrix.dep == '[all]'