Attempt to cache findent #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |