Skip to content

Second branch for merge of connectivity #326

Second branch for merge of connectivity

Second branch for merge of connectivity #326

Workflow file for this run

name: Run tests
on:
# Run on pushes to main
push:
branches:
- main
# And all pull requests
pull_request:
jobs:
test:
name: Run tests
# Run on the Github hosted runner
runs-on: ubuntu-latest
container:
image: firedrakeproject/firedrake-vanilla-default:latest
# Steps represent a sequence of tasks that will be executed as
# part of the jobs
steps:
- name: fix home
run: echo "HOME=/root" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- name: Checkout correct firedrake branch
run: |
/usr/bin/git config --global --add safe.directory /opt/firedrake/
cd /opt/firedrake/
git fetch
git checkout indiamai/fuse-quads
git pull
pip install pybind11 Cython
make
- name: Install checkedout fuse
run: |
python3 -m pip install --break-system-packages -e '.[dev]'
- name: Checkout correct FIAT branch
run: |
/usr/bin/git config --global --add safe.directory ~/
cd ~
git clone https://github.com/firedrakeproject/fiat.git
/usr/bin/git config --global --add safe.directory ~/fiat
cd fiat
git fetch
git checkout indiamai/integrate_fuse
git status
python3 -m pip install --break-system-packages -e .
- name: Checkout correct UFL branch
run: |
/usr/bin/git config --global --add safe.directory ~
cd ~
git clone https://github.com/firedrakeproject/ufl.git
/usr/bin/git config --global --add safe.directory ~/ufl
cd ufl
git fetch
git checkout indiamai/integrate-fuse
git status
python3 -m pip install --break-system-packages -e .
- name: Run tests
run: |
pip list
make tests
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: covdata
include-hidden-files: true
path: .coverage.*
coverage:
name: Coverage
needs: test
runs-on: ubuntu-latest
if: success() && github.ref == 'refs/heads/main'
container:
image: firedrakeproject/firedrake-vanilla-default:latest
# Steps represent a sequence of tasks that will be executed as
# part of the jobs
steps:
- name: "Check out the repo"
uses: "actions/checkout@v2"
- name: Install checkedout fuse
run: |
python3 -m pip install --break-system-packages -e '.[dev]'
- name: "Download coverage data"
uses: actions/download-artifact@v4
with:
name: covdata
- name: "Combine"
run: |
make coverage
export TOTAL=$(python3 -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
echo "total=$TOTAL" >> $GITHUB_ENV
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
- name: "Make badge"
uses: schneegans/[email protected]
with:
# GIST_TOKEN is a GitHub personal access token with scope "gist".
auth: ${{ secrets.GIST_SECRET }}
gistID: 8d09e14999153441dba99d1759e90707 # replace with your real Gist id.
filename: covbadge.json
label: Coverage
message: ${{ env.total }}%
minColorRange: 50
maxColorRange: 90
valColorRange: ${{ env.total }}