-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run Python unit tests in GitHub action (#362)
Signed-off-by: Matthias Goerens <[email protected]>
- Loading branch information
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Python Test | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
# Only the precheck module currently provides unit tests | ||
- 'scripts/src/precheck/*' | ||
|
||
jobs: | ||
enforce: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python 3.x Part 1 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Set up Python 3.x Part 2 | ||
run: | | ||
# set up python | ||
python3 -m venv ve1 | ||
cd scripts | ||
../ve1/bin/pip3 install -r requirements.txt | ||
../ve1/bin/pip3 install . | ||
cd .. | ||
- name: Run pytest | ||
run: | | ||
pytest scripts/src/precheck/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters