Skip to content

Commit 16f1f77

Browse files
authored
Add a test workflow for github actions
1 parent 6cc11a8 commit 16f1f77

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/tests.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Python tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
name: Run tests on ${{ matrix.os }} with Python ${{ matrix.python }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macOS-latest]
15+
python: ['3.8', '3.7']
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python ${{ matrix.python }}
21+
uses: actions/setup-python@v1
22+
with:
23+
python-version: ${{ matrix.python }}
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install pytest
28+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29+
- name: Run tests
30+
run: |
31+
pytest

0 commit comments

Comments
 (0)