Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINT] add GH CI workflow to test latest image #124

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions .github/workflows/test_latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
name: test latest image

on:
push:
branches: ['*']
schedule:
- cron: 0 0 1 * *
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

test_version:

runs-on: ubuntu-latest

steps:

- name: pull docker image
run: docker pull bids/mrtrix3_connectome:latest

- name: print help and version
run: |
docker run -t --rm --read-only \
-v /tmp:/tmp \
-v /var/tmp:/var/tmp \
bids/mrtrix3_connectome:latest --version

test_preproc:

runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y tree

- name: pull docker image
run: docker pull bids/mrtrix3_connectome:latest

- name: get data
run: |
mkdir -p ${HOME}/downloads
wget -c -O ${HOME}/downloads/preproc.tar.gz "https://osf.io/d9gx7/download"
mkdir -p ${HOME}/data
tar xf ${HOME}/downloads/preproc.tar.gz -C ${HOME}/data

- name: prepare output dir
run: |
mkdir -p ${HOME}/outputs

- name: Run preproc-level analysis for all subjects
run: |
docker run -t --rm --read-only \
-v /tmp:/tmp -v /var/tmp:/var/tmp \
-v ${HOME}/data/BIDS:/bids_dataset \
-v ${HOME}/data/outputs:/outputs \
-v ${HOME}/scratch:/scratch \
bids/mrtrix3_connectome \
/bids_dataset /outputs preproc --scratch /scratch

- name: check output
run: tree ${HOME}/outputs

test_participant:

runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y tree

- name: pull docker image
run: docker pull bids/mrtrix3_connectome:latest

- name: get data
run: |
mkdir -p ${HOME}/downloads
wget -c -O ${HOME}/downloads/participant.tar.gz "https://osf.io/skc5x/download"
mkdir -p ${HOME}/data
tar xf ${HOME}/downloads/participant.tar.gz -C ${HOME}/data

- name: prepare output dir
run: |
mkdir -p ${HOME}/outputs

- name: Run preproc-level analysis for all subjects
run: |
docker run -t --rm --read-only \
-v /tmp:/tmp -v /var/tmp:/var/tmp \
-v ${HOME}/data/BIDS:/bids_dataset \
-v ${HOME}/data/outputs:/outputs \
-v ${HOME}/scratch:/scratch \
bids/mrtrix3_connectome \
/bids_dataset /outputs participant \
--scratch /scratch \
--parcellation aal \
--streamlines 100000 \
--output_verbosity 3


- name: check output
run: tree ${HOME}/outputs

test_group:

runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y tree

- name: pull docker image
run: docker pull bids/mrtrix3_connectome:latest

- name: get data
run: |
mkdir -p ${HOME}/downloads
wget -c -O ${HOME}/downloads/group.tar.gz "https://osf.io/6s8bx/download"
mkdir -p ${HOME}/data
tar xf ${HOME}/downloads/group.tar.gz -C ${HOME}/data

- name: prepare output dir
run: |
mkdir -p ${HOME}/outputs

- name: Run group-level analysis
run: |
docker run -t --rm --read-only \
-v /tmp:/tmp -v /var/tmp:/var/tmp \
-v ${HOME}/data/BIDS:/bids_dataset \
-v ${HOME}/data/outputs:/outputs \
-v ${HOME}/scratch:/scratch \
bids/mrtrix3_connectome \
/bids_dataset /outputs group --scratch /scratch

- name: check output
run: tree ${HOME}/outputs