-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (46 loc) · 1.23 KB
/
run_unit_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
# GitHub Action to run spinedb_api unit tests
name: Unit tests
# Run workflow on every push
on:
push
jobs:
unit-tests:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest]
python-version: [3.9, "3.10", 3.11]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Version from Git tags
run: git describe --tags
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run:
python -c "import sys; print(sys.version)"
- name: Install unixodbc
if: runner.os == 'Linux'
run:
sudo apt-get install -y unixodbc-dev # Install to get sql.h headers
- name: Install dependencies
env:
PYTHONUTF8: 1
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: List packages
run:
pip list
- name: Run tests
env:
QT_QPA_PLATFORM: offscreen
run:
coverage run -m unittest discover --verbose
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3