Skip to content

Commit

Permalink
Separate out test workflows for changed files check vs. full test sui…
Browse files Browse the repository at this point in the history
…te (#216)
  • Loading branch information
jwallwork23 authored Sep 15, 2024
1 parent b6ec485 commit 6827403
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/citation_check.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: 'Citation Check'

on:
# Run only when commits are pushed to a branch or a PR that modifies a .cff file
# Run when a branch that modifies a .cff file is merged into main
push:
branches:
- main
paths:
- '**/*.cff'

# Run when commits are pushed to a branch or a PR that modifies a .cff file
pull_request:
paths:
- '**/*.cff'
Expand All @@ -16,9 +20,6 @@ jobs:
citation_check:
name: 'Check Citation'
runs-on: ubuntu-latest
container:
image: ghcr.io/mesh-adaptation/firedrake-parmmg:latest
options: --user root

steps:
- name: 'Check out the repo'
Expand All @@ -31,5 +32,5 @@ jobs:

- name: 'Check citation'
run: |
. /home/firedrake/firedrake/bin/activate
pip install cffconvert
make check_citation
9 changes: 5 additions & 4 deletions .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:

- name: 'Determine files differing from target branch'
id: changed-files
if: ${{ github.event_name != 'push' && github.ref != 'refs/heads/main' }}
uses: tj-actions/changed-files@v44
with:
files: |
Expand All @@ -49,26 +50,26 @@ jobs:
rm -rf build
- name: 'Setup Python'
if: ${{ (steps.changed-files.outputs.any_changed == 'true') || ( github.event_name == 'schedule') }}
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (steps.changed-files.outcome == 'success' && steps.changed-files.outputs.any_changed == 'true') || github.event_name == 'schedule' }}
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: 'Install Goalie'
if: ${{ (steps.changed-files.outputs.any_changed == 'true') || ( github.event_name == 'schedule') }}
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (steps.changed-files.outcome == 'success' && steps.changed-files.outputs.any_changed == 'true') || github.event_name == 'schedule' }}
run: |
. /home/firedrake/firedrake/bin/activate
python -m pip uninstall -y goalie
python -m pip install -e .
- name: 'Lint'
if: ${{ (steps.changed-files.outputs.any_changed == 'true') || ( github.event_name == 'schedule') }}
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (steps.changed-files.outcome == 'success' && steps.changed-files.outputs.any_changed == 'true') || github.event_name == 'schedule' }}
run: |
. /home/firedrake/firedrake/bin/activate
make lint
- name: 'Test Goalie'
if: ${{ (steps.changed-files.outputs.any_changed == 'true') || ( github.event_name == 'schedule') }}
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (steps.changed-files.outcome == 'success' && steps.changed-files.outputs.any_changed == 'true') || github.event_name == 'schedule' }}
run: |
. /home/firedrake/firedrake/bin/activate
python $(which firedrake-clean)
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cff-version: 1.2.0
message: If you use this software in a publication, please cite it using these metadata.
message: If you use this software in a publication then please cite it using these metadata.
title: Goalie
abstract: Goal-oriented error estimation and mesh adaptation for finite element problems solved using Firedrake.
authors:
Expand Down

0 comments on commit 6827403

Please sign in to comment.