Test replicates #64
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: | |
- dev | |
pull_request: | |
release: | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
runners: | |
description: "Runners to test on" | |
type: string | |
default: "gpu" | |
# 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.2" | |
jobs: | |
get-shards: | |
runs-on: ubuntu-latest | |
name: "Get Shards" | |
outputs: | |
shard: ${{ steps.set-shards.outputs.shard }} | |
total_shards: ${{ steps.set-shards.outputs.total_shards }} | |
steps: | |
- name: Check out pipeline code | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
with: | |
fetch-depth: 0 | |
- name: run nf-test-shard action | |
id: set-shards | |
uses: ./.github/actions/nf-test-shard | |
env: | |
NFT_VER: ${{ env.NFT_VER }} | |
with: | |
tags: "gpu" | |
max_shards: 2 | |
- name: Set outputs | |
id: set-outputs | |
run: | | |
echo "shard=${{ steps.set-shards.outputs.shard }}" >> $GITHUB_ENV | |
echo "total_shards=${{ steps.set-shards.outputs.total_shards }}" >> $GITHUB_ENV | |
nf-test-gpu: | |
needs: [get-shards] | |
runs-on: "gpu" | |
name: "GPU Test | ${{ matrix.profile }} | ${{ matrix.shard }} | ${{ matrix.NXF_VER }} | ${{ matrix.filters }}" | |
env: | |
NXF_VER: ${{ matrix.NXF_VER }} | |
# Only run on push if this is the nf-core dev branch (merged PRs) | |
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/methylseq') }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
profile: [docker, singularity] | |
shard: ${{ fromJson(needs.get-shards.outputs.shard) }} | |
NXF_VER: | |
- "24.10.2" | |
filters: [pipeline] | |
steps: | |
- name: Check out pipeline code | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
with: | |
fetch-depth: 0 | |
- name: Run nf-test Action | |
uses: ./.github/actions/nf-test | |
with: | |
profile: ${{ matrix.profile }},gpu | |
shard: ${{ matrix.shard }} | |
total_shards: ${{ needs.get-shards.outputs.total_shards }} | |
filters: ${{ matrix.filters }} | |
tags: "gpu" | |
confirm-pass: | |
runs-on: ubuntu-latest | |
needs: [nf-test-gpu] | |
if: always() | |
steps: | |
- name: One or more tests failed | |
if: ${{ contains(needs.*.result, 'failure') }} | |
run: exit 1 | |
- name: One or more tests cancelled | |
if: ${{ contains(needs.*.result, 'cancelled') }} | |
run: exit 1 | |
- name: All tests ok | |
if: ${{ contains(needs.*.result, 'success') }} | |
run: exit 0 | |
- name: debug-print | |
if: always() | |
run: | | |
echo "toJSON(needs) = ${{ toJSON(needs) }}" | |
echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" |