Skip to content

Commit 35ce5ae

Browse files
authored
Merge pull request #368 from jakobj/maint/separate-ci-checks
Refine github workflow and freeze some packages
2 parents 01665f2 + cb130b7 commit 35ce5ae

File tree

2 files changed

+34
-16
lines changed

2 files changed

+34
-16
lines changed

.github/workflows/tests.yaml

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,53 @@ jobs:
2020
- python-version: 3.8
2121
dep: "[dev]"
2222
steps:
23-
- name: checkout
24-
uses: actions/checkout@v2
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
2525
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v2
26+
uses: actions/setup-python@v4
2727
with:
2828
python-version: ${{ matrix.python-version }}
29-
- name: Install dependencies
29+
cache: pip
30+
cache-dependency-path: |
31+
requirements.txt
32+
extra-requirements.txt
33+
- name: Install pip
34+
run: |
35+
python -m pip install --upgrade pip
36+
- name: Install library and dependencies
3037
env:
3138
DEP: ${{ matrix.dep }}
3239
run: |
33-
python -m pip install --upgrade pip
34-
pip install -e .$DEP
35-
pip install pytest-cov coveralls
36-
- name: Code checks
40+
pip --version
41+
pip install --upgrade -e .$DEP
42+
pip install --upgrade pytest-cov coveralls
43+
- name: Run code checks (black)
3744
run: |
45+
black --version
3846
black --check .
47+
- name: Run code checks (flake8)
48+
run: |
49+
flake8 --version
3950
flake8 --config=.flake8 .
51+
- name: Run code checks (mypy)
52+
run: |
53+
mypy --version
4054
mypy cgp
55+
- name: Run code checks (isort)
56+
run: |
57+
isort --version
4158
isort --check-only cgp examples test
42-
- name: run tests
59+
- name: Run tests
4360
run: |
61+
pytest --version
4462
pytest --cov=cgp
45-
- name: Build Documentation
63+
- name: Build documentation
4664
run: |
47-
pip install gym || exit 1;
48-
make -C docs/ html-examples-short || exit 1;
65+
make -C docs/ html-examples-short
4966
if: matrix.python-version == 3.8 && matrix.dep == '[all]'
50-
- name: Coveralls
67+
- name: Run coveralls
5168
uses: AndreMiras/coveralls-python-action@develop
5269
with:
5370
parallel: true
5471
flag-name: Test suite
55-
if: matrix.python-version == 3.8 && matrix.dep == '[all]'
72+
if: matrix.python-version == 3.8 && matrix.dep == '[all]'

extra-requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ matplotlib ~= 3.4.1
33
scipy ~= 1.6.2
44
sympy ~= 1.8
55
torch ~= 1.8.0
6-
gym
7-
pygame
6+
gym ~= 0.18.3
87
# dev requirements
98
pytest ~= 5.4.1
109
mypy ~= 0.800
10+
click ~= 8.0.1
1111
black ~= 19.10b0
1212
flake8 ~= 3.7.9
1313
isort ~=5.2.2
1414
# doc requirements
15+
jinja2 ~= 3.0.1
1516
sphinx ~=3.1.2
1617
recommonmark~=0.6.0
1718
msmb_theme~=1.2.0

0 commit comments

Comments
 (0)