fix(docker): move venv out of /AReaL to avoid mount override #936
Workflow file for this run
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: Pre-commit Checks | |
| on: [pull_request] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Cache pre-commit environments | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Run pre-commit hooks | |
| run: | | |
| pip install pre-commit | |
| # generate-cli-docs requires the full areal package (language: system), | |
| # which is not installed in CI. Skip it here; it runs locally instead. | |
| SKIP=generate-cli-docs pre-commit run --all-files | |
| - name: Validate commit messages | |
| run: | | |
| pip install conventional-pre-commit | |
| FAILED=0 | |
| for SHA in $(git log --no-merges --format=%H origin/${{ github.base_ref }}..HEAD); do | |
| git log --format=%B -1 "$SHA" > /tmp/commit_msg | |
| if ! conventional-pre-commit feat fix docs gov style refactor perf test build ci chore revert /tmp/commit_msg; then | |
| echo "❌ Bad commit: $(git log --format=%s -1 "$SHA")" | |
| FAILED=1 | |
| fi | |
| done | |
| exit $FAILED |