Merge pull request #124 from 4C-multiphysics/dependabot/github_action… #449
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 quality | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| jobs: | |
| fourcipp-code-check: | |
| name: Code check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up virtual environment | |
| uses: ./.github/actions/setup-env | |
| with: | |
| python-version: 3.13 | |
| - name: Install requirements | |
| shell: bash -el {0} | |
| run: | | |
| conda activate fourcipp | |
| pip install -e .[dev,safe] | |
| pip install pre-commit | |
| - name: Run code-checks | |
| shell: bash -el {0} | |
| run: | | |
| conda activate fourcipp | |
| if [ "${GITHUB_REF}" = "refs/heads/main" ]; then | |
| SKIP=no-commit-to-branch pre-commit run --all-files | |
| else | |
| pre-commit run --all-files | |
| fi |