-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I added a github actions workflow for running the test suite on PRs and direct pushes to both dev and main. For some reason, the bash shell on the windows runner doesn't work when the shell script is a string in the hatch run command, but it works when it's executed as a script, so I also added a `test-suite.sh` script that is run by hatch in order to get the same test suite behavior on Linux, MacOS, and Windows. I also added an exit code to the `checkresults.py` script so that failed tests will properly trigger a failure in the CI.
- Loading branch information
Showing
4 changed files
with
40 additions
and
4 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,25 @@ | ||
name: Modulr CI | ||
|
||
on: | ||
push: | ||
branches: ["main", "dev"] | ||
pull_request: | ||
branches: ["main", "dev"] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: | | ||
3.12 | ||
- name: Install Hatch | ||
run: pipx install hatch | ||
- name: Run Hatch CI | ||
run: hatch run test | ||
shell: bash |
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
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,7 @@ | ||
#!/bin/bash | ||
|
||
for dir in testsuite/*/; do | ||
python modulr.py $dir 1>/dev/null | ||
python testsuite/checkresults.py $dir | ||
done | ||
|
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