Skip to content

Commit c44ced6

Browse files
committed
ci: Split tests and linting to separate jobs
1 parent 35f3eff commit c44ced6

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

.ci-before-script.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/bin/bash
22
set -ex
33

4+
python -m pip install --upgrade pip
5+
pip install -r requirements_test.txt && python setup.py develop
6+
47
if [ "$STEP" != "tests" ]; then
58
exit 0
69
fi
710

811
sudo apt-get update
9-
sudo apt install memcached
12+
sudo apt install memcached

.github/workflows/tests-and-lint.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ on:
77
branches: [master]
88

99
jobs:
10-
build:
10+
tests:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
max-parallel: 4
1414
matrix:
15-
python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
16-
step:
17-
- tests
18-
- lint
15+
python-version: [2.7, 3.6, 3.7, 3.8, 3.9, 3.10]
1916

2017
steps:
2118
- uses: actions/checkout@v2
@@ -25,9 +22,22 @@ jobs:
2522
python-version: ${{ matrix.python-version }}
2623
- name: Install Dependencies
2724
run: |
28-
python -m pip install --upgrade pip
29-
pip install -r requirements_test.txt && python setup.py develop
30-
STEP="${{ matrix.step}}" ./.ci-before-script.sh
25+
STEP="tests" ./.ci-before-script.sh
3126
- name: Run tests or lint
3227
run: |
33-
STEP="${{ matrix.step}}" ./.ci-runs-tests.sh
28+
STEP="tests" ./.ci-runs-tests.sh
29+
lint:
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Set up Python 3.10
35+
uses: actions/setup-python@v2
36+
with:
37+
python-version: 3.10
38+
- name: Install Dependencies
39+
run: |
40+
STEP="lint" ./.ci-before-script.sh
41+
- name: Run tests or lint
42+
run: |
43+
STEP="lint" ./.ci-runs-tests.sh

0 commit comments

Comments
 (0)