tests: Add GitHub action for tests

Relates #1097
This commit is contained in:
Matthias Hagmann 2024-02-10 14:25:18 +01:00 committed by Peter F. Patel-Schneider
parent 3eebd4b4b0
commit 059ebecf84
1 changed files with 33 additions and 0 deletions

33
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Ubuntu dependencies
run: |
sudo apt update
sudo apt install libdbus-1-dev libglib2.0-dev
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]
- name: Run tests
run: |
pytest