Code checks #64
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: Code checks | |
| on: | |
| schedule: | |
| - cron: '0 04 * * *' | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| workflow_dispatch: | |
| jobs: | |
| code_checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Install cubitpy | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[dev] | |
| - name: Code checks | |
| run: | | |
| pre-commit install --install-hooks | |
| if [ "${GITHUB_REF}" = "refs/heads/main" ]; then | |
| SKIP=no-commit-to-branch pre-commit run --all-files | |
| else | |
| pre-commit run --all-files | |
| fi |