[DEV] add PR title validation in CI #478
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: | |
| push: | |
| pull_request: | |
| workflow_call: | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: ghcr.io/learning-process/ppc-ubuntu:1.1 | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Setup environment | |
| run: | | |
| python3 -m pip install -r requirements.txt --break-system-packages --ignore-installed | |
| - name: Configure git safe directory | |
| run: | | |
| git config --global --add safe.directory '*' | |
| - name: Run pre-commit checks | |
| run: | | |
| git remote add upstream https://github.com/learning-process/parallel_programming_course.git || true | |
| git fetch --no-tags upstream master:upstream/master | |
| pre-commit run --from-ref upstream/master --to-ref HEAD |