Skip to content

Commit

Permalink
get project tests running
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanMarx committed May 25, 2024
1 parent 3315470 commit 7b6fdd3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .github/project-filters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
workflow: &workflow
- '.github/lib-filters.yaml'
- '.github/workflows/lib-tests.yaml'

projects/data/:
- *workflow
- 'projects/data/**'
- 'ml4gw/**'
- 'libs/ledger/**'
- 'libs/priors/**'
2 changes: 2 additions & 0 deletions .github/workflows/container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ jobs:
export TAG_LC=${tag,,}
cat app.tar.gz | docker import --change "ENV PATH=${{ env.path }}" - $TAG_LC
docker push $TAG_LC
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: Library Tests
name: library tests

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

on:
pull_request:
Expand All @@ -12,15 +12,35 @@ on:
- main

jobs:
build-and-test:
changes:
runs-on: ubuntu-latest
outputs:
projects: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: .github/project-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:
project: ${{ fromJSON(needs.changes.outputs.projects) }}
exclude:
# don't run non-existent .github/workflow tests,
# and exclude projects, whose tests are run in
# a different CI script
- library: 'workflow'
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
Expand Down

0 comments on commit 7b6fdd3

Please sign in to comment.