CI: add gpu tag test job #8
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 nf-tests | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
release: | |
types: [published] | |
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.2" | |
jobs: | |
get-shards: | |
runs-on: ubuntu-latest | |
name: "Get shards and total number of shards" | |
# 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') }}" | |
outputs: | |
shards: ${{ steps.list-shards.outputs.shards }} | |
total_shards: ${{ steps.list-shards.outputs.total_shards }} | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Check out pipeline code | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
with: | |
fetch-depth: 0 | |
- name: run nf-test-shard action | |
id: list-shards | |
uses: ./.github/actions/nf-test-shard | |
env: | |
NFT_VER: ${{ env.NFT_VER }} | |
nf-test: | |
runs-on: ${{ github.event.inputs.runners || 'self-hosted' }} | |
name: "Test | ${{ matrix.profile }} | ${{ matrix.shard }}" | |
# 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: | |
NXF_VER: | |
- "24.04.2" | |
shard: [1, 2] | |
filter: [pipeline] | |
profile: [conda, docker_self_hosted, singularity] | |
env: | |
NXF_ANSI_LOG: false | |
TOTAL_SHARDS: 2 | |
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 | |
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 }} | |
shards: ${{ needs.get-shards.outputs.shards }} | |
total_shards: ${{ needs.get-shards.outputs.total_shards }} | |
filters: ${{ matrix.filter }} | |
tags: | |
confirm-pass: | |
runs-on: ubuntu-latest | |
needs: [nf-test] | |
if: always() | |
steps: | |
- name: All tests ok | |
if: ${{ success() || !contains(needs.*.result, 'failure') }} | |
run: exit 0 | |
- name: One or more tests failed | |
if: ${{ contains(needs.*.result, 'failure') }} | |
run: exit 1 | |
- name: debug-print | |
if: always() | |
run: | | |
echo "toJSON(needs) = ${{ toJSON(needs) }}" | |
echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" |