Add workaround for petsc4py.PETSc.Vec.getArray() failure on Google Colab #407
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: RBniCS CI | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: numericalpdes/base_images:fenics-real | |
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/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} |