Skip to content

Commit

Permalink
add project tests ci
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanMarx committed May 25, 2024
1 parent 8447c41 commit 3315470
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/lib-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: lib-tests
name: Library Tests

on:
pull_request:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/project-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Project Tests

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches:
- main

jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: quay.io/singularity/singularity:v3.8.1
options: --privileged
strategy:
fail-fast: false
matrix:
project: [train, export, data]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build Apptainer image
run: |
cd projects/${{ matrix.project }}
apptainer build --fakeroot ${matrix.project}.sif apptainer.def
- name: Run tests in Apptainer container
run: |
cd projects/${{ matrix.project }}
apptainer exec --fakeroot ${matrix.project}.sif poetry run pytest

0 comments on commit 3315470

Please sign in to comment.