Update bug two #65
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: Create a pipeline and test it | |
on: | |
push: | |
branches: | |
- dev | |
paths-ignore: | |
- "docs/**" | |
- "CHANGELOG.md" | |
pull_request: | |
paths-ignore: | |
- "docs/**" | |
- "CHANGELOG.md" | |
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: | |
NXF_ANSI_LOG: false | |
jobs: | |
RunTestWorkflow: | |
# use the runner given by the input if it is dispatched manually, run on github if it is a rerun or on self-hosted by default | |
runs-on: ${{ github.event.inputs.runners || github.run_number > 1 && 'ubuntu-latest' || 'self-hosted' }} | |
env: | |
NXF_ANSI_LOG: false | |
strategy: | |
matrix: | |
NXF_VER: | |
- "23.10.0" | |
- "latest-everything" | |
steps: | |
- name: go to working directory | |
run: | | |
mkdir -p create-test-wf | |
cd create-test-wf | |
export NXF_WORK=$(pwd) | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | |
name: Check out source-code repository | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 | |
with: | |
python-version: "3.12" | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- name: Install Nextflow | |
uses: nf-core/setup-nextflow@v2 | |
with: | |
version: ${{ matrix.NXF_VER }} | |
- name: Run nf-core/tools | |
run: | | |
mkdir create-test-wf && cd create-test-wf | |
export NXF_WORK=$(pwd) | |
nf-core --log-file log.txt pipelines create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface" | |
# echo current directory | |
pwd | |
# echo content of current directory | |
ls -la | |
nextflow run nf-core-testpipeline -profile test,self_hosted_runner --outdir ./results | |
- name: Upload log file artifact | |
if: ${{ always() }} | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 | |
with: | |
name: nf-core-log-file-${{ matrix.NXF_VER }} | |
path: create-test-wf/log.txt | |
- name: Cleanup work directory | |
# cleanup work directory | |
run: sudo rm -rf create-test-wf | |
if: always() |