Skip to content

Cleanup test workflow #4475

Cleanup test workflow

Cleanup test workflow #4475

Workflow file for this run

name: Lint Code Base
on:
pull_request:
branches:
- develop
- staging
push:
branches:
- develop
- staging
merge_group:
jobs:
lint:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- run: |
python -m pip install pre-commit
python -m pip freeze --local
- name: Restore pre-commit cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-${{ runner.arch }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- run: |
pre-commit run --show-diff-on-failure --color=always \
--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
- name: Save pre-commit cache
id: cache-save
if: ${{ steps.cache-restore.outputs.cache-hit != 'true' && github.event_name == 'push' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/staging') }}
uses: actions/cache/save@v4
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-${{ runner.arch }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}