-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (45 loc) · 1.28 KB
/
run_tests.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
51
52
53
54
55
56
name: Unit Tests
on:
push:
branches:
- main
pull_request:
branches:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -e {0} # -e to fail on error
jobs:
run_tester:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: "3.9", os: ubuntu-latest, python: "3.9" }
- { name: "3.10", os: ubuntu-latest, python: "3.10" }
- { name: "3.11", os: ubuntu-latest, python: "3.11" }
- { name: "3.12", os: ubuntu-latest, python: "3.12" }
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python }}
cache: pip
- name: Install Python tools
run: |
python -m pip install --upgrade pip wheel
- name: Install Python package and dependencies
run: pip install .[test] coverage coveralls
- name: Run tests
run: coverage run --source=get_version -m pytest --verbose --color=yes
- name: Coveralls
uses: coverallsapp/github-action@v2