Skip to content

Release docker image associated to the final tag #403

Release docker image associated to the final tag

Release docker image associated to the final tag #403

Workflow file for this run

name: RBniCS CI
on:
push:
branches:
- "**"
pull_request:
branches:
- master
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
container: numericalpdes/base_images:fenics
steps:
- uses: actions/checkout@v4
- name: Install RBniCS
run: pip install .[tests]
- name: Run unit tests
run: pytest -svv tests/unit
- name: Run performance tests
run: pytest --benchmark-disable -svv tests/performance
- name: Run tutorials
run: |
cd tutorials/01_thermal_block && pytest -svv tutorial_thermal_block.ipynb && cd -
cd tutorials/02_elastic_block && pytest -svv tutorial_elastic_block.ipynb && cd -
cd tutorials/03_hole && pytest -svv tutorial_hole.ipynb && cd -
cd tutorials/04_graetz && pytest -svv tutorial_graetz_1.ipynb && cd -
cd tutorials/05_gaussian && pytest -svv tutorial_gaussian_eim.ipynb && cd -
docker:
if: github.repository == 'RBniCS/RBniCS' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [test]
env:
RELEASE_IMAGE: rbnics/rbnics:latest
steps:
- uses: actions/checkout@v4
- name: Build the docker release image
run: docker build --pull -t ${RELEASE_IMAGE} -f docker/Dockerfile.dolfin .
- name: Try importing the library inside the docker image
run: docker run -i --rm ${RELEASE_IMAGE} python3 -c 'import dolfin; import rbnics'
- name: Run unit tests to verify that the docker image is working
run: docker run -i --rm ${RELEASE_IMAGE} bash -c "cd RBniCS && pytest -svv tests/unit"
- name: Log into the docker registry
run: docker login -u ${{ secrets.CI_REGISTRY_USER }} -p ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Push to the docker registry
run: docker push ${RELEASE_IMAGE}