Skip to content

Commit 4a48dc5

Browse files
committed
add simple github action to run tests
1 parent eb90955 commit 4a48dc5

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/test.yaml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: test-workflow
2+
on:
3+
# When any branch in the repository is pushed
4+
push:
5+
# When a pull request is created
6+
pull_request:
7+
# When manually triggered to run
8+
workflow_dispatch:
9+
10+
jobs:
11+
lint:
12+
strategy:
13+
matrix:
14+
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
15+
name: Lint ${{ matrix.python-version }}
16+
runs-on: 'ubuntu-20.04'
17+
container: python:${{ matrix.python-version }}
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Lint code
23+
run: |
24+
pip install lintlizard==0.18.0 "click<8.1"
25+
lintlizard
26+
27+
# Run tests
28+
test:
29+
strategy:
30+
matrix:
31+
python-version: ['3.8', '3.9', '3.10', '3.11']
32+
# Do not cancel any jobs when a single job fails
33+
fail-fast: false
34+
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
35+
runs-on: 'ubuntu-20.04'
36+
container: python:${{ matrix.python-version }}
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v2
40+
41+
- name: Install dependencies
42+
run: |
43+
CFLAGS="-O0" pip install -r requirements_tests.txt
44+
45+
- name: Run tests
46+
run: pytest

0 commit comments

Comments
 (0)