Skip to content

Commit 3197d58

Browse files
authored
chore: add pre-commit job and change test job in CI workflow (#7)
* chore: add pre-commit GitHub Action job lint job is removed and pre-commit job is added to CI workflow. * fix: change test to working state in CI workflow
1 parent a50320f commit 3197d58

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,33 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
7-
lint:
6+
pre-commit:
87
runs-on: ubuntu-latest
98
steps:
10-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1110
- name: Setup Python
12-
uses: actions/setup-python@v1
11+
uses: actions/setup-python@v4
1312
with:
14-
python-version: '3.10'
15-
- name: Install tox
16-
run: python -m pip install tox
17-
- name: Run linting
18-
run: python -m tox -e lint
13+
python-version: '3.x'
14+
- name: Install dependencies
15+
run: |
16+
python3 -m pip install pre-commit
17+
pre-commit install
18+
- name: Run pre-commit against all the files
19+
run: pre-commit run --all-files
1920

2021
test:
2122
runs-on: ubuntu-latest
2223
strategy:
2324
matrix:
24-
python: ['3.6', '3.7', '3.8', '3.9', '3.10']
25+
python: ['3.7', '3.8', '3.9', '3.x']
2526
steps:
26-
- uses: actions/checkout@v2
27-
- name: Setup Python
28-
uses: actions/setup-python@v1
27+
- uses: actions/checkout@v3
28+
- name: Setup Python ${{ matrix.python }}
29+
uses: actions/setup-python@v4
2930
with:
3031
python-version: ${{ matrix.python }}
31-
- name: Install tox
32-
run: python -m pip install tox
32+
- name: Install dependencies
33+
run: make package-install
3334
- name: Run tests
34-
run: python -m tox -e py # Run tox using the version of Python in `PATH`
35+
run: make test

0 commit comments

Comments
 (0)