Skip to content

Commit eab12c2

Browse files
committed
added multi python version testing
1 parent 2e30dd5 commit eab12c2

File tree

1 file changed

+21
-32
lines changed

1 file changed

+21
-32
lines changed

.github/workflows/lint_and_test.yml

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,26 @@ name: Lint and Test
22
on: [push]
33

44
jobs:
5-
lint:
6-
name: Code Linting
5+
lint-test:
6+
name: Lint and Test
77
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [3.7, 3.8, 3.9,.3.10]
811
steps:
9-
- uses: actions/checkout@main
10-
- name: Set up Python 3.7
11-
uses: actions/setup-python@main
12-
with:
13-
python-version: 3.7
14-
- name: Install dependencies
15-
run: |
16-
python -m pip install --upgrade pip
17-
make dev
18-
- name: Lint
19-
working-directory: ${{ github.workspace }}
20-
run: |
21-
make lint
22-
test:
23-
name: Code Testing
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@main
27-
- name: Set up Python 3.7
28-
uses: actions/setup-python@main
29-
with:
30-
python-version: 3.7
31-
- name: Install dependencies
32-
run: |
33-
python -m pip install --upgrade pip
34-
make dev
35-
- name: Test
36-
working-directory: ${{ github.workspace }}
37-
run: |
38-
make test
12+
- uses: actions/checkout@main
13+
- uses: actions/setup-python@main
14+
with:
15+
python-version: ${{ matrix.python-version }}
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
make dev
20+
- name: Check code style
21+
working-directory: ${{ github.workspace }}
22+
run: |
23+
make lint
24+
- name: Runs unit tests
25+
working-directory: ${{ github.workspace }}
26+
run: |
27+
make test

0 commit comments

Comments
 (0)