Skip to content

Build & run notebooks #59

Build & run notebooks

Build & run notebooks #59

Workflow file for this run

name: Build & run notebooks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
nipype_branch:
description: 'Build specific Nipype branch'
required: true
default: 'master'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: generate the Dockerfile from generate.sh
run: |
BRANCH=${{ github.event.inputs.nipype_branch }}
BRANCH=${BRANCH:-"master"}
bash generate.sh $BRANCH
# In this step, this action saves a list of existing images,
# the cache is created without them in the post run.
# It also restores the cache if it exists.
- uses: satackey/action-docker-layer-caching@v0.0.11
with:
key: tutorial-docker-cache-{hash}
restore-keys: |
tutorial-docker-cache-
layer-tutorial-docker-cache-
- name: build the image
run: docker build . --file Dockerfile -t nipype_tutorial:latest
test_1:
needs: build
runs-on: ubuntu-latest
steps:
- uses: satackey/action-docker-layer-caching@v0.0.11
with:
key: tutorial-docker-cache-{hash}
restore-keys: |
tutorial-docker-cache-
layer-tutorial-docker-cache-
- name: run test 1
run: docker run --rm nipype_tutorial:latest python /home/neuro/nipype_tutorial/test_notebooks.py 1
test_2:
needs: build
runs-on: ubuntu-latest
steps:
- uses: satackey/action-docker-layer-caching@v0.0.11
with:
key: tutorial-docker-cache-{hash}
restore-keys: |
tutorial-docker-cache-
layer-tutorial-docker-cache-
- name: run test 2
run: docker run --rm nipype_tutorial:latest python /home/neuro/nipype_tutorial/test_notebooks.py 2
test_3:
needs: build
runs-on: ubuntu-latest
steps:
- uses: satackey/action-docker-layer-caching@v0.0.11
with:
key: tutorial-docker-cache-{hash}
restore-keys: |
tutorial-docker-cache-
layer-tutorial-docker-cache-
- name: run test 3
run: docker run --rm nipype_tutorial:latest python /home/neuro/nipype_tutorial/test_notebooks.py 3