Skip to content

Commit

Permalink
Update Nextflow and Compliance Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeckman314 committed Sep 25, 2024
1 parent 0cc839e commit 1d4485b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 68 deletions.
66 changes: 7 additions & 59 deletions .github/workflows/compliance-test.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
# Workflow for running the TES compliance suite against Funnel

#
# This includes the following steps:
# 1. Build Funnel and store the resulting binary artifact
# 2. Install tes-compliance-suite and run against every version of TES simultaneously
# 3. start-report-deployment: Send a dispatch to the funnel-compliance repository to generate and publish
# the tes-compliance-suite report to https://ohsu-comp-bio.github.io/funnel-compliance/

#
# Optionally debug via SSH
# Ref: https://fleetdm.com/engineering/tips-for-github-actions-usability
#
# To use this step uncomment and place anywhere in the build steps. The build will pause on this step and
# output a ssh address associated with the Github action worker. Helpful for debugging build steps and
# and intermediary files/artifacts.
#
# - name: "Debug: Package dependancies for tmate (CentOS)"
# run: |
# yum install -y xz
# ln -s /bin/true /bin/apt-get
#
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

Expand All @@ -29,10 +24,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: quay.io/ohsu-comp-bio/slurm
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21

Expand All @@ -54,19 +48,16 @@ jobs:
matrix:
version: [1.0.0, 1.1.0]
db: ["boltdb", "mongodb"]
compute: ["local", "slurm"]
compute: ["local"]
needs: build
runs-on: ubuntu-latest
container:
image: quay.io/ohsu-comp-bio/slurm
options: --hostname slurmctl --cap-add sys_admin
steps:
# Required to access the 'tests/mongo.config.yml' file
# Perhaps uploading it as an artifact would be more efficient?
- name: Check out code
uses: actions/checkout@v2

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
with:
name: funnelBin

Expand All @@ -76,60 +67,17 @@ jobs:
if [ ${{ matrix.db }} = "mongodb" ]; then
make start-mongodb
cat `pwd`/tests/mongo.config.yml >> config.yml
# Required for Funnel to connect MongoDB
echo "172.17.0.1 localhost" >> /etc/hosts
elif [ ${{ matrix.compute }} = "slurm" ]; then
cat `pwd`/tests/slurm.config.yml >> config.yml
cp config.yml /opt/funnel_config.yml
# Start Slurm
/usr/local/bin/docker-entrypoint.sh
fi
chmod +x funnel
FLAGS="--config `pwd`/config.yml"
./funnel server run $FLAGS &> funnel.logs &
./funnel server run --config `pwd`/config.yml &> funnel.logs &
- name: Run OpenAPI Test Runner
run: |
# Clone the 'upstream' OpenAPI Test Runner when PR #65 is merged
# https://github.com/elixir-cloud-aai/openapi-test-runner/pull/65
# git clone https://github.com/elixir-cloud-aai/openapi-test-runner
git clone https://github.com/ohsu-comp-bio/openapi-test-runner -b fix/create-and-filter-task
git clone https://github.com/elixir-cloud-aai/openapi-test-runner
cd openapi-test-runner
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python setup.py install
openapi-test-runner report --version "${{ matrix.version }}" --server "http://localhost:8000/"
- name: Install TES compliance suite
run: |
git clone https://github.com/lbeckman314/tes-compliance-suite -b feature/tesv1.1
cd tes-compliance-suite
/root/.pyenv/shims/python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python setup.py install
mkdir reports
- name: Test compliance (Report Publishing)
run: |
cd tes-compliance-suite
source venv/bin/activate
tes-compliance-suite report --version "${{ matrix.version }}" --server "http://localhost:8000/"
start-report-deployment:
needs: compliance
runs-on: ubuntu-latest
steps:
# https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event
- name: Start report generation
uses: passeidireto/trigger-external-workflow-action@main
env:
PAYLOAD_AUTHOR: "Funnel"
PAYLOAD_REVISION: "3"
with:
repository: ohsu-comp-bio/funnel-compliance
event: start-report
github_pat: ${{ secrets.ACTIONS_TOKEN }}

15 changes: 6 additions & 9 deletions .github/workflows/nextflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.21

Expand All @@ -29,28 +29,25 @@ jobs:
needs: build
steps:
- name: Download Funnel
uses: actions/download-artifact@v4
uses: actions/download-artifact@v2
with:
name: funnelBin
path: funnel

- name: Start Funnel
working-directory:
run: |
cd funnel/
chmod +x ./funnel
./funnel server --LocalStorage.AllowedDirs $HOME run &
- name: Install Nextflow
run: |
cd ..
git clone https://github.com/nextflow-io/nextflow/ -b tes-update-1.1
git clone https://github.com/nextflow-io/nextflow
cd nextflow
make compile
- name: Install nf-canary and GA4GH-TES plugin
run: |
cd ..
git clone https://github.com/seqeralabs/nf-canary
cd nf-canary
cat <<EOF >> nextflow.config
Expand All @@ -60,8 +57,8 @@ jobs:
process.executor = 'tes'
tes.endpoint = 'http://localhost:8000'
EOF
- name: Run nf-canary tests
run: |
cd ../nf-canary
../nextflow/launch.sh run main.nf
./nextflow/nextflow run nf-canary/main.nf

0 comments on commit 1d4485b

Please sign in to comment.