Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Python unit tests in GitHub action #362

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/python-test.yml
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/
6 changes: 4 additions & 2 deletions release/release_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
".github/workflows/nightly_test.yml",
".github/workflows/metrics.yml",
".github/workflows/codeql.yml",
".github/dependabot.yml"
".github/dependabot.yml",
".github/workflows/python-test.yml"
]
},
"stage": {
Expand All @@ -42,7 +43,8 @@
".github/workflows/version_check.yml",
".github/workflows/codeql.yml",
".github/workflows/check-locks-on-owners-submission.yml",
".github/dependabot.yml"
".github/dependabot.yml",
".github/workflows/python-test.yml"
]
}
}
Expand Down
Loading