Skip to content

Commit 42237d1

Browse files
committed
Add basic GitHub Action
Signed-off-by: Cristian Le <[email protected]>
1 parent 838fd32 commit 42237d1

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: test
2+
run-name: Run tests
3+
4+
on:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
10+
jobs:
11+
pre-commit:
12+
name: Check pre-commit
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-python@v4
17+
- uses: pre-commit/[email protected]
18+
19+
pytest:
20+
name: Run pytests
21+
runs-on: ubuntu-latest
22+
needs: [ pre-commit ]
23+
strategy:
24+
matrix:
25+
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11" ]
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
- name: Install pytest
33+
run: pip install pytest invocations mock pytest-relaxed
34+
- name: Setup patchwork
35+
run: pip install -e .
36+
- name: Test with pytest
37+
run: pytest

0 commit comments

Comments
 (0)