Skip to content

Commit

Permalink
split standard CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Jul 19, 2023
1 parent 55976c1 commit 408de69
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 39 deletions.
46 changes: 7 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,12 @@ on:
jobs:
preload_containers:
uses: ./.github/workflows/preload-containers.yml

test:
needs: preload_containers
name: Run standard workflow test
runs-on: ubuntu-latest
env:
NXF_VER: ${{ matrix.nxf_ver }}
strategy:
fail-fast: false
matrix:
test_profile: ["test"]
profile: ["docker"]
nxf_ver: ['22.10.0', ''] # minimum supported version, latest version

steps:
- name: Check out pipeline code
uses: actions/checkout@v3

- uses: nf-core/setup-nextflow@v1
with:
version: ${{ matrix.nxf_ver }}

- name: Restore docker cache
id: restore-docker
uses: actions/cache@v3
if: matrix.profile == 'docker'
with:
path: ${{ runner.temp }}/docker
key: ${{ needs.preload_docker.outputs.docker-cache-key }}

- name: Load docker images from cache
if: steps.restore-docker.outputs.cache-hit == 'true'
run: |
find $HOME -name '*.tar'
find ${{ runner.temp }}/docker/ -name '*.tar' -exec sh -c 'docker load < {}' \;
- name: Run pipeline with test data
continue-on-error: false
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_profile}},${{ matrix.profile }}
standard_test:
needs: preload_containers
uses: ./.github/workflows/standard-test.yml
with:
docker-cache-key: ${{ jobs.preload_containers.output.docker-cache-key }}
singularity-cache-key: ${{ jobs.preload_containers.output.singularity-cache-key }}


49 changes: 49 additions & 0 deletions .github/workflows/standard-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Run standard test with singularity and docker profiles

on:
workflow_call:
inputs:
docker-cache-key:
required: true
type: string
singularity-cache-key:
required: true
type: string

jobs:
standard_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test_profile: ["test"]
profile: ["docker"]
nxf_ver: ['22.10.0', 'latest']

steps:
- name: Check out pipeline code
uses: actions/checkout@v3

- uses: nf-core/setup-nextflow@v1
with:
version: ${{ matrix.nxf_ver }}

- name: Restore docker images
if: matrix.profile == 'docker'
id: restore-docker
uses: actions/cache/restore@v3
with:
path: ${{ runner.temp }}/docker
key: ${{ inputs.docker-cache-key }}

- name: Load docker images from cache
if: steps.restore-docker.outputs.cache-hit == 'true'
run: |
find $HOME -name '*.tar'
find ${{ runner.temp }}/docker/ -name '*.tar' -exec sh -c 'docker load < {}' \;
- name: Run pipeline with test data
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_profile}},${{ matrix.profile }}

0 comments on commit 408de69

Please sign in to comment.