Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#45: Add reusable workflows #46

Merged
merged 5 commits into from
Sep 15, 2024
Merged

#45: Add reusable workflows #46

merged 5 commits into from
Sep 15, 2024

Conversation

ddundo
Copy link
Member

@ddundo ddundo commented Sep 15, 2024

Closes #45.

After this is merged I will change citation_check.yml in Animate/Goalie/Movement to be:

name: 'Citation Check'

on:
  push:
    branches:
      - main
    paths:
      - '**/*.cff'

  pull_request:
    paths:
      - '**/*.cff'

  workflow_dispatch:

jobs:
  citation_check:
    uses: mesh-adaptation/mesh-adaptation-docs/.github/workflows/citation_check.yml@main

and test_suite.yml in Animate will be:

name: 'Run Animate Test Suite'

on:
  push:
    branches:
      - main
  pull_request:
  schedule:
    - cron: '0 1 * * 0'

jobs:
  test_suite:
    uses: mesh-adaptation/mesh-adaptation-docs/.github/workflows/test_suite.yml@main
    with:
      install-command: 'python -m pip uninstall -y animate && python -m pip install -e .'
      test-command: |
        export GITHUB_ACTIONS_TEST_RUN=1
        python $(which firedrake-clean)
        export ANIMATE_CHECKPOINT_DIR=$(pwd)/.checkpoints
        python -m coverage erase
        python -m coverage run --source=animate -m pytest -v --durations=20 test
        python -m coverage report
      changed-files-patterns: |
        **/*.py
        **/*.cxx

and similarly for Goalie and Movement.

@ddundo ddundo self-assigned this Sep 15, 2024
@ddundo ddundo added the testing Extensions and improvements to the testing infrastructure label Sep 15, 2024
@ddundo ddundo requested a review from jwallwork23 September 15, 2024 16:12
Copy link
Member

@jwallwork23 jwallwork23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool, thanks @ddundo. Just one minor suggestion.

.github/workflows/reusable_citation_check.yml Outdated Show resolved Hide resolved
.github/workflows/reusable_test_suite.yml Outdated Show resolved Hide resolved
@ddundo
Copy link
Member Author

ddundo commented Sep 15, 2024

@jwallwork23 maybe I could also remove

check_citation:
	@echo "Checking CITATION.cff formatting..."
	@cffconvert --validate
	@echo "PASS"

from the Makefiles and add it centrally to reusable_citation_check.yml?

@jwallwork23
Copy link
Member

@jwallwork23 maybe I could also remove

check_citation:
	@echo "Checking CITATION.cff formatting..."
	@cffconvert --validate
	@echo "PASS"

from the Makefiles and add it centrally to reusable_citation_check.yml?

I'd prefer to keep it in so that users and developers can run locally.

@jwallwork23
Copy link
Member

@jwallwork23 maybe I could also remove

check_citation:
	@echo "Checking CITATION.cff formatting..."
	@cffconvert --validate
	@echo "PASS"

from the Makefiles and add it centrally to reusable_citation_check.yml?

Actually, you're right - it's probably not necessary for this to be duplicated across all the repos. The citation isn't going to change that often either. Let's remove it from the Makefile.

@ddundo
Copy link
Member Author

ddundo commented Sep 15, 2024

Great, thanks! I made these changes and tested it on Animate mesh-adaptation/animate#148 so I'll merge :)

@ddundo ddundo merged commit 2740bb0 into main Sep 15, 2024
2 checks passed
@ddundo ddundo deleted the 45_reusing_workflows branch September 15, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Extensions and improvements to the testing infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reusing workflows
2 participants