Skip to content

Commit 5d90099

Browse files
committed
split tests into lint and test
1 parent 8032b13 commit 5d90099

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

.github/workflows/test.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ name: Run tests
33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
lint:
77

88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [3.7, 3.8, 3.9, '3.10']
12-
11+
python-version: [3.7]
1312
steps:
1413
- uses: actions/checkout@v2
1514

@@ -35,6 +34,38 @@ jobs:
3534
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3635
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3736
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+
- name: Black fmt
38+
run: |
39+
black --check .
40+
- name: Check imports
41+
run: |
42+
isort --check .
43+
44+
test:
45+
46+
runs-on: ubuntu-latest
47+
strategy:
48+
matrix:
49+
python-version: [3.7, 3.8, 3.9, '3.10']
50+
steps:
51+
- uses: actions/checkout@v2
52+
53+
- name: Cleanup pre-installed tools
54+
run: |
55+
# This is a fix for https://github.com/actions/virtual-environments/issues/1918
56+
sudo rm -rf /usr/share/dotnet
57+
sudo rm -rf /opt/ghc
58+
sudo rm -rf "/usr/local/share/boost"
59+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
60+
- name: Set up Python ${{ matrix.python-version }}
61+
uses: actions/setup-python@v2
62+
with:
63+
python-version: ${{ matrix.python-version }}
64+
- name: Install dependencies
65+
run: |
66+
python -m pip install --upgrade pip
67+
python -m pip install -r tests/requirements.txt
68+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3869
- name: Test with pytest
3970
run: |
4071
tox -- --tag=ci

0 commit comments

Comments
 (0)