-
Notifications
You must be signed in to change notification settings - Fork 14
Scripts unit testing #184
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
Scripts unit testing #184
Changes from all commits
18bbefc
b38b694
e242923
b1fcf04
0bb0b6d
6250739
f10640c
0a89041
67094cb
dfeb7e6
b671821
fd0d75c
e7604ff
428fef2
c9f0e49
72f8713
f00ad51
0962e5b
2260076
cbf6650
0281e8f
8cb8568
e36af12
68d3727
cebdca6
664422e
66fa4ae
b15831d
bb1be20
f6fb03a
7cfe3f3
4f61f66
89d4a4b
47239c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,35 @@ | ||||||||||
| name: Python Unit Tests | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| pull_request: | ||||||||||
| workflow_dispatch: | ||||||||||
|
|
||||||||||
| permissions: read-all | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| python_unit_tests: | ||||||||||
| name: python_unit_tests | ||||||||||
| runs-on: ubuntu-24.04 | ||||||||||
| timeout-minutes: 10 | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
If it takes longer, it is not a unit test. |
||||||||||
|
|
||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v5 | ||||||||||
| - name: Set up Python | ||||||||||
| uses: actions/setup-python@v5 | ||||||||||
| with: | ||||||||||
| python-version: '3.14' | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| - name: Install dependencies | ||||||||||
| run: | | ||||||||||
| # We only have 1 external dependency other than pytest for now, so | ||||||||||
| # list them here | ||||||||||
| # If this changes, we may want to switch to a dependencies file of | ||||||||||
| # some format | ||||||||||
| python -m pip install --upgrade pip | ||||||||||
| pip install pytest | ||||||||||
| pip install networkx | ||||||||||
| pip install PyYAML | ||||||||||
|
Comment on lines
+28
to
+30
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| - name: Test with pytest | ||||||||||
| run: | | ||||||||||
| git config --global user.name 'Testing' | ||||||||||
| git config --global user.email 'Testing' | ||||||||||
|
Comment on lines
+33
to
+34
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do any of the tests require commit? If not, then simply remove the git configs
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah a couple of them require these setting |
||||||||||
| pytest -vv | ||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Save the planet appeal :) - Only run if there is a change to Python files