Skip to content

Attempt to cache findent #1

Attempt to cache findent

Attempt to cache findent #1

# This check is used to ensure documentation can be built from the main branch.
name: Check Formatting
on: [workflow_call]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup findent
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
run: |
pip install findent
- name: Format sources
env:
FINDENT_FLAGS: ${{ vars.FINDENT_FLAGS }}
run: |
find sources/ -name "*.f90" -exec bash -c "findent < \"{}\" > \"{}\".tmp && mv -f \"{}\".tmp \"{}\"" \;
- name: Check format
run: |
git diff --exit-code