Skip to content

Commit

Permalink
Merge pull request #27 from bids-apps/test_latest
Browse files Browse the repository at this point in the history
[INFRA] add Github CI to test latest stable version
  • Loading branch information
Remi-Gau authored May 19, 2023
2 parents 26d9b8d + 5483249 commit 6e45544
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/test_latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
name: test latest image

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

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

defaults:
run:
shell: bash -l {0}

jobs:

test_latest_image:

strategy:
matrix:
dataset: ['1', '2']
fail-fast: false

runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y tree
- name: Clone repo
uses: actions/checkout@v3

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

- name: get data
run: |
wget https://raw.githubusercontent.com/bids-apps/maintenance-tools/main/utils/get_data_from_osf.sh
bash get_data_from_osf.sh ds114_test${{ matrix.dataset }}
- name: prepare output dir
run: mkdir -p ${HOME}/outputs${{ matrix.dataset }}

- name: participant 01
run: |
docker run -t --rm --read-only \
-v ${HOME}/data/ds114_test${{ matrix.dataset }}:/bids_dataset \
-v ${HOME}/outputs${{ matrix.dataset }}:/outputs \
-v /tmp:/tmp \
-v /var/tmp:/var/tmp \
bids/oppni:latest \
/bids_dataset /outputs participant \
--participant_label 01
- name: participant 02
run: |
docker run -t --rm --read-only \
-v ${HOME}/data/ds114_test${{ matrix.dataset }}:/bids_dataset \
-v ${HOME}/outputs${{ matrix.dataset }}:/outputs \
-v /tmp:/tmp \
-v /var/tmp:/var/tmp \
bids/oppni:latest \
/bids_dataset /outputs participant \
--participant_label 02
- name: group
run: |
docker run -t --rm --read-only \
-v ${HOME}/data/ds114_test${{ matrix.dataset }}:/bids_dataset \
-v ${HOME}/outputs${{ matrix.dataset }}:/outputs \
-v /tmp:/tmp \
-v /var/tmp:/var/tmp \
bids/oppni:latest\
/bids_dataset /outputs group
- name: check output
run: tree ${HOME}/outputs${{ matrix.dataset }}
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ repos:
language: docker_image
types: [dockerfile]
entry: ghcr.io/hadolint/hadolint hadolint

ci:
skip: [hadolint-docker]

0 comments on commit 6e45544

Please sign in to comment.