fix tf apply errors #108
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
# Runs auto-formatting and type checking on push to any branch | |
name: "Catalogue graph: Auto-formatting & type checking" | |
on: | |
push: | |
paths: 'catalogue_graph/**' | |
permissions: | |
id-token: write | |
contents: write | |
jobs: | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Setup CI | |
run: | | |
./catalogue_graph/scripts/ci-setup.sh | |
- name: Run typecheck | |
run: | | |
./catalogue_graph/scripts/typecheck.sh | |
autoformat: | |
runs-on: ubuntu-latest | |
needs: typecheck | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Setup CI | |
run: | | |
./catalogue_graph/scripts/ci-setup.sh | |
- name: Run autoformat | |
run: | | |
./catalogue_graph/scripts/autoformat.sh | |
- name: Check for formatting changes | |
id: check_formatting_changes | |
run: | | |
if [[ -n $(git status --porcelain) ]]; then | |
echo "changes=true" >> "$GITHUB_OUTPUT"; | |
fi | |
- name: Commit and push formatting changes | |
if: steps.check_formatting_changes.outputs.changes == 'true' | |
run: | | |
git config user.name "Github on behalf of Wellcome Collection" | |
git config user.email "[email protected]" | |
git commit -am "Apply auto-formatting rules" | |
git push |