Skip to content

Update documentation and parallelise viability #70

Update documentation and parallelise viability

Update documentation and parallelise viability #70

Workflow file for this run

name: format-checker
on:
push:
branches:
- main
paths:
- ".github/workflows/formatting.yml"
- "**.f90"
- "**.F90"
pull_request:
branches:
- main
- development
types:
- opened
- synchronize
paths:
- ".github/workflows/formatting.yml"
- "**.f90"
- "**.F90"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: formatting
cancel-in-progress: false
jobs:
format-checker:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: actions-setup-python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Run pre-commit hooks
id: run_precommit
run: pre-commit run --all-files
continue-on-error: true
- name: Comment on PR if pre-commit failed
if: github.event_name == 'pull_request' && steps.run_precommit.outcome != 'success'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "⚠️ The pre-commit format check failed.
Please run \`pre-commit run --all-files\` locally and fix any issues."