Formatting #61
This file contains hidden or 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
name: Formatting | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- '**' | |
merge_group: | |
branches: [ main ] | |
schedule: | |
- cron: "0 0 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
formatting-checks: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Setup Python environment (for pre-commit) | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Clean dotnet temporary folder | |
run: | | |
sudo rm -rf /tmp/.dotnet | |
- name: Install pre-commit and dependencies | |
run: | | |
pip install pre-commit | |
pre-commit install-hooks | |
- name: Run pre-commit checks | |
env: | |
TMPDIR: ${{ runner.temp }} | |
DOTNET_CLI_HOME: ${{ runner.temp }} | |
run: | | |
pre-commit run --all-files |