Skip to content

Commit

Permalink
ci: Try using new CI from official nf-test tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Aug 6, 2024
1 parent b2af8e2 commit 3eff227
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,34 +39,42 @@ jobs:
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8]
NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }}
profile: ["bases2fastq", "bcl2fastq", "bclconvert", "fqtk", "sgdemux", "skip_tools", "mkfastq", "test_pe"]
profile: ["docker"]
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
fetch-depth: 0

# - name: Set up JDK 11
# uses: actions/setup-java@v2
# with:
# java-version: "11"
# distribution: "adopt"

# Install Nextflow
- name: Install Nextflow
uses: nf-core/setup-nextflow@v2
- uses: actions/setup-python@v4
with:
version: "${{ matrix.NXF_VER }}"
python-version: "3.11"
architecture: "x64"

# Install nf-test
- name: Install nf-test
- name: Install pdiff to see diff between nf-test snapshots
run: |
conda install -c bioconda nf-test=$NFTEST_VER
python -m pip install --upgrade pip
pip install pdiff
# Run nf-test
- name: Run nf-test
run: |
$CONDA/bin/nf-test test tests/pipeline/${{ matrix.profile }}.nf.test --profile=test,docker --junitxml=test.xml
- uses: nf-core/setup-nextflow@v2
with:
version: "${{ matrix.NXF_VER }}"

# If the test fails, output the software_versions.yml using the 'batcat' utility
- name: Output log on failure
if: failure()
- name: Install nf-test
run: |
sudo apt install bat > /dev/null
batcat --decorations=always --color=always .nf-test/tests/*/output/pipeline_info/software_versions.yml
wget -qO- https://get.nf-test.com | bash
sudo mv nf-test /usr/local/bin/
- name: Run Tests (Shard ${{ matrix.shard }}/${{ strategy.job-total }})
run: nf-test test --ci --shard ${{ matrix.shard }}/${{ strategy.job-total }} --changed-since HEAD^ --profile "+${{ matrix.profile }}"

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
Expand Down

0 comments on commit 3eff227

Please sign in to comment.