-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (41 loc) · 1.19 KB
/
pytest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: tests
# Cancel previous tests for this branch if a new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
# Allow manual trigger of workflow
workflow_dispatch:
# Run tests on push/merge to main
push:
branches:
- main
# Run tests on anything that has a pull request to main/development
pull_request:
branches:
- main
- development
jobs:
pytest:
name: Test ${{ matrix.python-version }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash # Default to using bash on all
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"] # "3.11" fails due to swig
os: ["ubuntu-latest"] # "macos-latest", "windows-latest" fails due to swig
steps:
- uses: actions/checkout@v4
- name: Setup Python 3.9
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install swig
python -m pip install ".[dev]"
- name: Run pytest
run: pytest tests