Add pre filter and shard counting step #41
Workflow file for this run
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
name: Run GPU nf-tests | |
on: | |
push: | |
branches: | |
# https://docs.renovatebot.com/key-concepts/automerge/#branch-vs-pr-automerging | |
- "renovate/**" # branches Renovate creates | |
pull_request: | |
branches: [master] | |
paths: | |
- ".github/workflows/gpu-tests.yml" | |
- "modules/nf-core/parabricks/**" | |
merge_group: | |
types: [checks_requested] | |
branches: [master] | |
workflow_dispatch: | |
inputs: | |
runners: | |
description: "Runners to test on" | |
type: choice | |
options: | |
- "ubuntu-latest" | |
- "self-hosted" | |
default: "self-hosted" | |
# Cancel if a newer run is started | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# renovate: datasource=github-releases depName=askimed/nf-test versioning=semver | |
NFT_VER: "0.9.2" | |
NXF_ANSI_LOG: false | |
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity | |
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity | |
# renovate: datasource=github-releases depName=nextflow-io/nextflow versioning=semver | |
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-gpu: | |
runs-on: "gpu" | |
needs: nf-test-changes | |
if: ${{ fromJSON(needs.nf-test-changes.outputs.total_shards) > 0 }} | |
name: "GPU | ${{ matrix.tags}} | ${{ matrix.profile }} | ${{ matrix.shard }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
shard: ${{ needs.nf-test-changes.outputs.shards }} | |
profile: [docker_self_hosted, singularity] # conda? | |
tags: ${{ needs.nf-test-changes.outputs.tags }} | |
env: | |
NXF_ANSI_LOG: false | |
TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.total_shards }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Run nf-test Action | |
uses: ./.github/actions/nf-test-action | |
env: | |
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }} | |
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }} | |
SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }} | |
SENTIEON_AUTH_MECH: "GitHub Actions - token" | |
with: | |
profile: ${{ matrix.profile }},gpu | |
shard: ${{ matrix.shard }} | |
total_shards: ${{ env.TOTAL_SHARDS }} | |
tags: ${{matrix.tags}},gpu |