Skip to content

Commit

Permalink
Add docker-build action to take advantage of caching and use shardi…
Browse files Browse the repository at this point in the history
…ng (#105)

* Update nf-test to 0.9.0-rc1

* Add `--shard` option

* Update to nf-test 0.9.0-rc2

* Add ci flag

* Cleanup obsolete snapshots and add missing snapshots

* Add docker action and use gh cache

* Add docker action to build image

* Add setup-buildx action

* Add load true option

* Remove docker build from static tests

* Delete lukas.csv

* Remove static tests

* Delete run-tests.sh

* Update nf-test URL

* Update ci-tests.yml

---------

Co-authored-by: Sebastian Schoenherr <[email protected]>
  • Loading branch information
lukfor and seppinho authored May 29, 2024
1 parent 44572d0 commit b7b13ca
Show file tree
Hide file tree
Showing 7 changed files with 213 additions and 99 deletions.
34 changes: 22 additions & 12 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ on: [push, pull_request]

jobs:

build:
test:

runs-on: ubuntu-latest
strategy:
matrix:
shard: [1, 2, 3, 4, 5]

steps:
- name: Checkout
Expand All @@ -18,21 +21,28 @@ jobs:
java-version: '11'
distribution: 'adopt'

- name: Setup Nextflow ${{ matrix.nextflow }}
- name: Setup Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "latest-edge"

- name: Install nf-test
run: |
wget -qO- https://code.askimed.com/install/nf-test | bash
wget -qO- get.nf-test.com | bash -s 0.9.0-rc2
sudo mv nf-test /usr/local/bin/
- name: Build Docker
run: docker build -t genepi/nf-gwas .

- name: Run Tests
run: nf-test test

- name: Run static tests with development profile
run: ./run-tests.sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
tags: "genepi/nf-gwas"
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Run Tests (Shard ${{ matrix.shard }}/${{ strategy.job-total }})
run: nf-test test --ci --shard ${{ matrix.shard }}/${{ strategy.job-total }}
50 changes: 0 additions & 50 deletions lukas.csv

This file was deleted.

14 changes: 0 additions & 14 deletions run-tests.sh

This file was deleted.

Loading

0 comments on commit b7b13ca

Please sign in to comment.