Skip to content

Commit 9b235c3

Browse files
committed
Add basic GitHub Action
Signed-off-by: Cristian Le <[email protected]>
1 parent 6399af1 commit 9b235c3

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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: ${{ matrix.os }}
22+
needs: [ pre-commit ]
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: [ubuntu-latest]
27+
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
28+
include:
29+
- os: ubuntu-20.04
30+
python-version: "3.6"
31+
steps:
32+
- uses: actions/checkout@v3
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
- name: Install pytest
38+
run: pip install pytest invocations mock pytest-relaxed
39+
- name: Setup patchwork
40+
run: pip install -e .
41+
- name: Test with pytest
42+
run: pytest

0 commit comments

Comments
 (0)