forked from ML4GW/aframe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add initial testing infra * use container with git * revert to python3.10 container * cd into lib directory * cd into lib directory * remove fail fast * remove fail fast * add some debugs * cd into test dir * add basic wavenet tests foor architectures * remove priors from libs workflows due to lack of tests * typo in filenam * fix workflow filter * add pytest to arch deps * add project tests ci * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * get project tests running * run pytest inside container * update data poetry lock * separate tests and build * fix syntax errors * fix syntax errors * fix syntax errors * fix syntax errors * fix syntax errors * add pytest as dev dep in data project * add train tests * add infer tests * add export tests * get export tests working * fix urllib constraint issue in poetry container * update infer apptainer file * install pytest inside containers for CI * fix injection unit tests * call pytest directly in CI * tar in same command as tetsts due to permission issues * add debug statement to build * add more debug statements * add more debug statements * pin poetry version in infer container * add conditional for docker push to only run on pushes * remove debug statements
- Loading branch information
Showing
27 changed files
with
9,586 additions
and
8,149 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 @@ | ||
# define filters for file changes | ||
# to trigger unit tests | ||
|
||
# filter for changes | ||
# to workflow | ||
workflow: &workflow | ||
- '.github/lib-filters.yaml' | ||
- '.github/workflows/lib-tests.yaml' | ||
|
||
|
||
# use paths for filter names | ||
# for simplicity in ci-test.yaml | ||
|
||
# cleaner way to run all jobs | ||
# if workflow file is changed? | ||
|
||
# libraries | ||
architectures: | ||
- *workflow | ||
- 'libs/architectures/**' | ||
- 'ml4gw/**' | ||
|
||
ledger: | ||
- *workflow | ||
- 'libs/ledger/**' |
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 @@ | ||
workflow: &workflow | ||
- '.github/lib-filters.yaml' | ||
- '.github/workflows/lib-tests.yaml' | ||
|
||
data: | ||
- *workflow | ||
- 'projects/data/**' | ||
- 'ml4gw/**' | ||
- 'libs/ledger/**' | ||
- 'libs/priors/**' | ||
|
||
infer: | ||
- *workflow | ||
- 'projects/infer/**' | ||
- 'hermes/**' | ||
- 'libs/ledger/**' | ||
|
||
train: | ||
- *workflow | ||
- 'projects/train/**' | ||
- 'ml4gw/**' | ||
- 'libs/ledger/**' | ||
- 'libs/architectures/**' | ||
|
||
export: | ||
- *workflow | ||
- 'projects/export/**' | ||
- 'ml4gw/**' | ||
- 'hermes/**' |
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,74 @@ | ||
name: library tests | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
# first job users filters to output which libraries | ||
# and projects have updates that need testing | ||
changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
libraries: ${{ steps.filter.outputs.changes }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: .github/lib-filters.yaml | ||
if: github.event.pull_request.draft == false | ||
|
||
# second job takes those outputs and runs | ||
# unit tests on these libs and projects | ||
tests: | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
strategy: | ||
fail-fast: false # is this desired behavior here? | ||
matrix: | ||
library: ${{ fromJSON(needs.changes.outputs.libraries) }} | ||
exclude: | ||
# don't run non-existent .github/workflow tests, | ||
# and exclude projects, whose tests are run in | ||
# a different CI script | ||
- library: 'workflow' | ||
permissions: | ||
packages: read | ||
container: | ||
# container with python and git | ||
image: cicirello/pyaction:4.8 | ||
volumes: | ||
- ${{ github.workspace }}:/github/workspace | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
# build the libraries environment | ||
- | ||
name: build environment | ||
env: | ||
test_dir: /github/workspace/libs/${{ matrix.library }} | ||
run: | | ||
python -m pip install poetry | ||
cd $test_dir | ||
poetry install | ||
shell: bash | ||
|
||
# run its unit tests inside that environment | ||
- | ||
name: run tests | ||
env: | ||
test_dir: /github/workspace/libs/${{ matrix.library }} | ||
run: | | ||
cd $test_dir | ||
poetry run pytest | ||
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.