Skip to content

Fix dependencies and unit tests #1505

Fix dependencies and unit tests

Fix dependencies and unit tests #1505

Workflow file for this run

# 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