Skip to content

Commit

Permalink
run validation pipelines in azure using github action (#85)
Browse files Browse the repository at this point in the history
* run validation pipelines in azure using github action

Signed-off-by: Jorge Aguilera <[email protected]>
  • Loading branch information
jagedn authored Aug 29, 2024
1 parent 1192f6e commit 433b8ea
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/nfazure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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: |
sudo manager
cd validation
export NOMAD_PLUGIN_VERSION=nfazure
./run-all.sh --skiplocal --nfgithub
10 changes: 10 additions & 0 deletions validation/run-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -uex
BUILD=0
SKIPLOCAL=0
NFAZURE=0
NFGHACTION=0
NFSUN=0
NFSLEEP=0
NFDEMO=0
Expand All @@ -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
Expand Down Expand Up @@ -69,6 +71,14 @@ 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 hello -w /projects/ -c 2-volumes.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
Expand Down

0 comments on commit 433b8ea

Please sign in to comment.