Skip to content

Commit

Permalink
add filter step to cpu tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Nov 20, 2024
1 parent 8262be5 commit 2d7e4ee
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,29 @@ env:
NXF_VER: "24.10.1"

jobs:
nf-test-changes:
name: nf-test-changes
runs-on: ubuntu-latest
outputs:
shards: ${{ steps.get-shards.outputs.shards }}
total_shards: ${{ steps.get-shards.outputs.total_shards }}
tags: ${{ steps.get-shards.outputs.tags }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0

- name: get number of shards
id: get-shards
uses: ./.github/actions/number-of-shards
env:
NFT_VER: ${{ env.NFT_VER }}

- name: list changes
run: |
echo shards = ${{ steps.get-shards.outputs.shards }}
echo num_shards = ${{ steps.get-shards.outputs.total_shards }}
nf-test:
runs-on: ${{ github.event.inputs.runners || 'self-hosted' }}
# NOTE I think this is the cleanest way to get them organized
Expand All @@ -45,20 +68,19 @@ jobs:
# ...
# workflow | singularity | 3
name: "${{ matrix.profile }} | ${{ matrix.shard }}"
# TODO
# needs: get-number-of-shards
# if: ${{ fromJSON(needs.get-number-of-shards.outputs.shards) != fromJSON('["1", "0"]') }}
needs: nf-test-changes
if: ${{ fromJSON(needs.nf-test-changes.outputs.total_shards) > 0 }}
strategy:
fail-fast: false
matrix:
# NOTE We could split these, but there's probably going to be more process tests than workflow tests, so we're just going to combine them all and bump up the shards for now
# NOTE The name of the test would be name: "${{ matrix.filter }} | ${{ matrix.profile }} | ${{ matrix.shard }}"
# filter: [process, workflow]
profile: [conda, docker_self_hosted, singularity]
shard: [1, 2, 3, 4, 5]
shard: ${{ needs.nf-test-changes.outputs.shards }}
env:
# FIXME Bumping them up to make the transition smooth, then we can throttle them back
TOTAL_SHARDS: 5
TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.total_shards }}
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }}
steps:
Expand All @@ -70,4 +92,5 @@ jobs:
with:
profile: ${{ matrix.profile }}
shard: ${{ matrix.shard }}
total_shards: ${{ env.TOTAL_SHARDS }}
total_shards: ${{ needs.nf-test-changes.outputs.total_shards }}
tags: ${{ needs.nf-test-changes.outputs.tags }}

0 comments on commit 2d7e4ee

Please sign in to comment.