Skip to content

Commit

Permalink
Merge pull request #372 from pyiron/timeout
Browse files Browse the repository at this point in the history
Add timeout for build process
  • Loading branch information
jan-janssen authored Sep 2, 2024
2 parents 08da753 + 73da457 commit 3a96886
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,41 @@ jobs:
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Build pyiron/base
timeout-minutes: 5
run: |
docker build -t pyiron/base:latest base/
docker tag pyiron/base:latest pyiron/base:"$(date +%F)"
- name: Build pyiron/md
timeout-minutes: 5
run: |
tail --lines=+5 base/environment.yml >> md/environment.yml
docker build -t pyiron/md:latest md/
docker tag pyiron/md:latest pyiron/md:"$(date +%F)"
- name: Build pyiron/continuum
timeout-minutes: 5
run: |
docker build -t pyiron/continuum:latest continuum/
docker tag pyiron/continuum:latest pyiron/continuum:"$(date +%F)"
- name: Build pyiron/pyiron
timeout-minutes: 5
run: |
tail --lines=+5 md/environment.yml >> pyiron/environment.yml
docker build -t pyiron/pyiron:latest pyiron/
docker tag pyiron/pyiron:latest pyiron/pyiron:"$(date +%F)"
- name: Build pyiron/potentialworkshop
timeout-minutes: 5
run: |
tail --lines=+5 pyiron/environment.yml >> potentialworkshop/environment.yml
docker build -t pyiron/potentialworkshop:latest potentialworkshop/
docker tag pyiron/potentialworkshop:latest pyiron/potentialworkshop:"$(date +%F)"
- name: Build pyiron/experimental
timeout-minutes: 5
run: |
tail --lines=+5 base/environment.yml >> experimental/environment.yml
docker build -t pyiron/experimental:latest experimental/
docker tag pyiron/experimental:latest pyiron/experimental:"$(date +%F)"
- name: Build pyiron/mpie_cmti
timeout-minutes: 5
run: |
tail --lines=+5 pyiron/environment.yml >> mpie_cmti/environment.yml
docker build -t pyiron/mpie_cmti:latest mpie_cmti/
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,59 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build pyiron/base
timeout-minutes: 5
run: |
docker build -t pyiron/base:latest base/
docker tag pyiron/base:latest pyiron/base:"$(date +%F)"
- name: Build pyiron/md
timeout-minutes: 5
run: |
tail --lines=+5 base/environment.yml >> md/environment.yml
docker build -t pyiron/md:latest md/
docker tag pyiron/md:latest pyiron/md:"$(date +%F)"
- name: Build pyiron/continuum
timeout-minutes: 5
run: |
docker build -t pyiron/continuum:latest continuum/
docker tag pyiron/continuum:latest pyiron/continuum:"$(date +%F)"
- name: Build pyiron/pyiron
timeout-minutes: 5
run: |
tail --lines=+5 md/environment.yml >> pyiron/environment.yml
docker build -t pyiron/pyiron:latest pyiron/
docker tag pyiron/pyiron:latest pyiron/pyiron:"$(date +%F)"
- name: Build pyiron/potentialworkshop
timeout-minutes: 5
run: |
tail --lines=+5 pyiron/environment.yml >> potentialworkshop/environment.yml
docker build -t pyiron/potentialworkshop:latest potentialworkshop/
docker tag pyiron/potentialworkshop:latest pyiron/potentialworkshop:"$(date +%F)"
- name: Build pyiron/experimental
timeout-minutes: 5
run: |
tail --lines=+5 base/environment.yml >> experimental/environment.yml
docker build -t pyiron/experimental:latest experimental/
docker tag pyiron/experimental:latest pyiron/experimental:"$(date +%F)"
- name: Build pyiron/mpie_cmti
timeout-minutes: 5
run: |
tail --lines=+5 pyiron/environment.yml >> mpie_cmti/environment.yml
docker build -t pyiron/mpie_cmti:latest mpie_cmti/
docker tag pyiron/mpie_cmti:latest pyiron/mpie_cmti:"$(date +%F)"
# Testing
- run: docker images
- run: docker run --rm pyiron/continuum /bin/bash -c 'source /opt/conda/bin/activate; i=0; for f in $(ls "${HOME}"/notebooks_*/*.ipynb); do jupyter nbconvert --ExecutePreprocessor.timeout=9999999 --ExecutePreprocessor.kernel_name=python3 --to notebook --execute $f || i=$((i+1)); done; if [ $i -gt 0 ]; then exit 1; fi;'
- run: docker run --rm pyiron/base /bin/bash -c 'source /opt/conda/bin/activate; i=0; for f in $(ls "${HOME}"/notebooks_*/*.ipynb); do jupyter nbconvert --ExecutePreprocessor.timeout=9999999 --ExecutePreprocessor.kernel_name=python3 --to notebook --execute $f || i=$((i+1)); done; if [ $i -gt 0 ]; then exit 1; fi;'
- run: docker run --rm pyiron/pyiron /bin/bash -c 'source /opt/conda/bin/activate; i=0; for f in $(ls "${HOME}"/notebooks_*/*.ipynb); do jupyter nbconvert --ExecutePreprocessor.timeout=9999999 --ExecutePreprocessor.kernel_name=python3 --to notebook --execute $f || i=$((i+1)); done; if [ $i -gt 0 ]; then exit 1; fi;'
- run: docker run --rm pyiron/experimental /bin/bash -c 'source /opt/conda/bin/activate; i=0; for f in $(ls "${HOME}"/notebooks_*/*.ipynb); do jupyter nbconvert --ExecutePreprocessor.timeout=9999999 --ExecutePreprocessor.kernel_name=python3 --to notebook --execute $f || i=$((i+1)); done; if [ $i -gt 0 ]; then exit 1; fi;'
- name: Test pyiron/continuum
timeout-minutes: 5
run: docker run --rm pyiron/continuum /bin/bash -c 'source /opt/conda/bin/activate; i=0; for f in $(ls "${HOME}"/notebooks_*/*.ipynb); do jupyter nbconvert --ExecutePreprocessor.timeout=9999999 --ExecutePreprocessor.kernel_name=python3 --to notebook --execute $f || i=$((i+1)); done; if [ $i -gt 0 ]; then exit 1; fi;'
- name: Test pyiron/base
timeout-minutes: 5
run: docker run --rm pyiron/base /bin/bash -c 'source /opt/conda/bin/activate; i=0; for f in $(ls "${HOME}"/notebooks_*/*.ipynb); do jupyter nbconvert --ExecutePreprocessor.timeout=9999999 --ExecutePreprocessor.kernel_name=python3 --to notebook --execute $f || i=$((i+1)); done; if [ $i -gt 0 ]; then exit 1; fi;'
- name: Test pyiron/pyiron
timeout-minutes: 20
run: docker run --rm pyiron/pyiron /bin/bash -c 'source /opt/conda/bin/activate; i=0; for f in $(ls "${HOME}"/notebooks_*/*.ipynb); do jupyter nbconvert --ExecutePreprocessor.timeout=9999999 --ExecutePreprocessor.kernel_name=python3 --to notebook --execute $f || i=$((i+1)); done; if [ $i -gt 0 ]; then exit 1; fi;'
- name: Test pyiron/experimental
timeout-minutes: 5
run: docker run --rm pyiron/experimental /bin/bash -c 'source /opt/conda/bin/activate; i=0; for f in $(ls "${HOME}"/notebooks_*/*.ipynb); do jupyter nbconvert --ExecutePreprocessor.timeout=9999999 --ExecutePreprocessor.kernel_name=python3 --to notebook --execute $f || i=$((i+1)); done; if [ $i -gt 0 ]; then exit 1; fi;'
# Export Environments
- run: mkdir -p environment; chmod 777 environment
- run: docker run -v $(pwd)/environment:/home/jovyan/ --rm pyiron/base /bin/bash -c 'source /opt/conda/bin/activate; conda env export > /home/jovyan/pyiron_base_$(date +%F).yml;'
Expand Down

0 comments on commit 3a96886

Please sign in to comment.