From 0a3f62ef652e89bcf3b076c8abead5b982a7415c Mon Sep 17 00:00:00 2001 From: Jorge Date: Thu, 29 Aug 2024 13:20:55 +0200 Subject: [PATCH] run validation pipelines in azure using github action (#85) * run validation pipelines in azure using github action Signed-off-by: Jorge Aguilera --- .github/workflows/nfazure.yml | 49 +++++++++++++++++++++++++++++++++++ validation/run-all.sh | 9 +++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/nfazure.yml diff --git a/.github/workflows/nfazure.yml b/.github/workflows/nfazure.yml new file mode 100644 index 0000000..bfa90ec --- /dev/null +++ b/.github/workflows/nfazure.yml @@ -0,0 +1,49 @@ +name: nf-azure CI +on: + workflow_dispatch: + +jobs: + build: + name: Build nf-nomad + if: "!contains(github.event.head_commit.message, '[ci skip]')" + runs-on: nfazure + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + java_version: [19] + + steps: + - name: Environment + run: env | sort + + - name: Checkout + uses: actions/checkout@v1 + with: + fetch-depth: 1 + submodules: true + + - name: Setup Java ${{ matrix.java_version }} + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java_version}} + architecture: x64 + + - name: Compile + run: ./gradlew assemble + + - name: Tests + run: ./gradlew check + env: + GRADLE_OPTS: '-Dorg.gradle.daemon=false' + + - name: Install + run: ./gradlew clean unzipPlugin -x test -P version=nfazure + env: + GRADLE_OPTS: '-Dorg.gradle.daemon=false' + + - name: Validate + run: | + cd validation + export NOMAD_PLUGIN_VERSION=nfazure + ./run-all.sh --skiplocal --nfgithub diff --git a/validation/run-all.sh b/validation/run-all.sh index c5d5297..8d41317 100755 --- a/validation/run-all.sh +++ b/validation/run-all.sh @@ -5,6 +5,7 @@ set -uex BUILD=0 SKIPLOCAL=0 NFAZURE=0 +NFGHACTION=0 NFSUN=0 NFSLEEP=0 NFDEMO=0 @@ -13,6 +14,7 @@ NFDEMO=0 [[ -f $HOME/.nextflow/plugins/nf-nomad-latest/ ]] && BUILD=1 [[ "$@" =~ '--skiplocal' ]] && SKIPLOCAL=1 [[ "$@" =~ '--nfazure' ]] && NFAZURE=1 +[[ "$@" =~ '--nfgithub' ]] && NFGHACTION=1 [[ "$@" =~ '--nfsun' ]] && NFSUN=1 [[ "$@" =~ '--sleep' ]] && NFSLEEP=1 [[ "$@" =~ '--demo' ]] && NFDEMO=1 @@ -69,6 +71,13 @@ else echo "skip nfazure" fi +if [ "$NFGHACTION" == 1 ]; then + cd ~/integration-tests/az-nomadlab; NXF_ASSETS=/projects/assets nextflow run hello -w /projects/ -c nextflow.config + cd ~/integration-tests/az-nomadlab; NXF_ASSETS=/projects/assets nextflow run bactopia/bactopia -c nextflow.config -w /projects -profile test,docker --outdir /projects/bactopia/outdir --accession SRX4563634 --coverage 100 --genome_size 2800000 --datasets_cache /projects/bactopia/datasets +else + echo "skip ghaction" +fi + #NOTE: In this use-case you need to be in the same network of sun-nomadlab server, for example using a tailscale connection #NOTE2: You need to have 2 secrets stored in your Nextlow: SUN_NOMADLAB_ACCESS_KEY and SUN_NOMADLAB_SECRET_KEY