Skip to content

Commit

Permalink
Add GitHub workflow for pytest unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Morgenstern <[email protected]>
  • Loading branch information
martinmo committed Mar 20, 2024
1 parent bd730f7 commit c6d7734
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Run Python unit and regression tests

"on":
push:
paths:
- '**.py'
- .github/workflows/test-python.yml

jobs:
lint-python-syntax:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip3 install --upgrade pip setuptools
- run: pip3 install -r Tests/test-requirements.txt
- run: pytest Tests
3 changes: 2 additions & 1 deletion Tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,5 @@ It needs to be run in two cases:

Note: The Python version used for running `pip-compile` should be consistent. The currently
used version is documented in the header of the `requirements.txt`. It should match the
version used in the Docker image (see [Dockerfile](Dockerfile)).
version used in the Docker image (see [Dockerfile](Dockerfile)) and in our GitHub
workflows (`lint-python.yml` and `test-python.yml` in `.github/workflows`).

0 comments on commit c6d7734

Please sign in to comment.