Skip to content

Test OASISx against DOLFINx (docker) #76

Test OASISx against DOLFINx (docker)

Test OASISx against DOLFINx (docker) #76

Workflow file for this run

name: Test OASISx against DOLFINx (docker)
on:
push:
branches:
- main
workflow_call:
inputs:
tag:
description: 'Tag of DOLFINx docker image'
default: 'nightly'
required: true
type: string
workflow_dispatch:
inputs:
tag:
description: 'Tag of DOLFINx docker image'
default: 'nightly'
required: true
type: string
pull_request:
branches:
- main
schedule:
- cron: "0 8 * * *"
env:
DEB_PYTHON_INSTALL_LAYOUT: deb_system
DEFAULT_TAG: nightly
jobs:
get_image:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.docker_tag.outputs.image }}
steps:
- id: docker_tag
run: echo "image=${{ inputs.tag || env.DEFAULT_TAG }}" >> $GITHUB_OUTPUT
build:
needs: get_image
runs-on: ubuntu-22.04
container: ghcr.io/fenics/dolfinx/dolfinx:${{ needs.get_image.outputs.image }}
steps:
- uses: actions/checkout@v4
- name: "Install oasisx"
run: python3 -m pip install --break-system-packages .[test,docs]
- name: Run formatting checks
uses: ./.github/actions/linting
- name: Run tests
run: python3 -m pytest
- name: "Run demos"
run: |
python3 demo/taylor_green.py -N 8 -N 16 -N 32 -dt=0.005
python3 demo/assembly_strategies.py
- name: Upload coverage report as artifact
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: htmlcov
if-no-files-found: error