chore(ci): upgrade GitHub Actions for Node 24 compatibility and refactor check-bypass #1684
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: Codestyle-Check | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| jobs: | |
| check-bypass: | |
| name: Check bypass | |
| uses: ./.github/workflows/check-bypass.yml | |
| with: | |
| workflow-name: codestyle | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| pre-commit: | |
| name: Pre Commit | |
| needs: check-bypass | |
| if: needs.check-bypass.outputs.can-skip != 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| PR_ID: ${{ github.event.pull_request.number }} | |
| BRANCH: develop | |
| steps: | |
| - name: Cleanup | |
| run: | | |
| rm -rf * .[^.]* | |
| - name: Clone GraphNet | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.base.ref }} | |
| fetch-depth: 1000 | |
| - name: Merge PR to test branch | |
| run: | | |
| git fetch origin pull/${PR_ID}/merge | |
| git checkout -b test FETCH_HEAD | |
| - name: Setup python3.10 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| pip install pre-commit==2.17.0 | |
| - name: Check pre-commit | |
| run: | | |
| set +e | |
| bash -x tools/codestyle/pre_commit.sh;EXCODE=$? | |
| exit $EXCODE |