Add gantt plot nf-test #58
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: nf-aggregate CI | |
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
release: | |
types: [published] | |
env: | |
NXF_ANSI_LOG: false | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Run pipeline with test data | |
# Only run on push if this is the nf-aggregate dev branch (merged PRs) | |
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'seqeralabs/nf-aggregate') }}" | |
runs-on: ubuntu-latest | |
env: | |
TOWER_ACCESS_TOKEN: ${{ secrets.TOWER_ACCESS_TOKEN }} | |
strategy: | |
matrix: | |
NXF_VER: | |
- "23.10.0" | |
- "latest-everything" | |
steps: | |
- name: Check out pipeline code | |
uses: actions/checkout@v3 | |
- name: Install Nextflow | |
uses: nf-core/setup-nextflow@v1 | |
with: | |
version: "${{ matrix.NXF_VER }}" | |
- name: Run pipeline with test data | |
run: | | |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results | |
changes: | |
name: Check for changes | |
runs-on: ubuntu-latest | |
outputs: | |
# Expose matched filters as job 'tags' output variable | |
tags: ${{ steps.filter.outputs.changes }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Combine all tags.yml files | |
id: get_username | |
run: find . -name "tags.yml" -not -path "./.github/*" -exec cat {} + > .github/tags.yml | |
- name: debug | |
run: cat .github/tags.yml | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: ".github/tags.yml" | |
nf-test: | |
name: nf-test ${{ matrix.tags }} ${{ matrix.profile }} | |
needs: [changes] | |
if: needs.changes.outputs.tags != '[]' | |
runs-on: ubuntu-latest | |
env: | |
TOWER_ACCESS_TOKEN: ${{ secrets.TOWER_ACCESS_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
NXF_VER: | |
- "latest-everything" | |
tags: ["${{ fromJson(needs.changes.outputs.tags) }}"] | |
profile: | |
- "docker" | |
- "conda" | |
steps: | |
- name: Check out pipeline code | |
uses: actions/checkout@v3 | |
- name: Install Nextflow | |
uses: nf-core/setup-nextflow@v1 | |
with: | |
version: "${{ matrix.NXF_VER }}" | |
- name: Set up miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
auto-update-conda: true | |
channels: conda-forge,bioconda,defaults | |
python-version: ${{ matrix.python-version }} | |
- name: Conda setup | |
run: | | |
conda clean -a | |
conda install -n base conda-libmamba-solver | |
conda config --set solver libmamba | |
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH | |
echo $(realpath python) >> $GITHUB_PATH | |
- name: Cache nf-test installation | |
id: cache-software | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/usr/local/bin/nf-test | |
/home/runner/.nf-test/nf-test.jar | |
key: ${{ runner.os }}-${{ env.NFTEST_VER }}-nftest | |
- name: Install nf-test | |
if: steps.cache-software.outputs.cache-hit != 'true' | |
run: | | |
wget -qO- https://code.askimed.com/install/nf-test | bash | |
sudo mv nf-test /usr/local/bin/ | |
- name: Run nf-test | |
run: | | |
nf-test test --tag ${{ matrix.tags }} --profile "test,${{ matrix.profile }}" --junitxml=test.xml | |
- name: Output log on failure | |
if: failure() | |
run: | | |
sudo apt install bat > /dev/null | |
batcat --decorations=always --color=always ${{ github.workspace }}/.nf-test/tests/*/meta/nextflow.log | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: always() # always run even if the previous step fails | |
with: | |
report_paths: test.xml |