Lint #3728
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: Lint | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - stable-*.* | |
| schedule: | |
| # Every day at 3:30 AM UTC | |
| - cron: 30 3 * * * | |
| concurrency: | |
| # Group by workflow and ref; the last component ensures that for pull requests | |
| # we limit to one concurrent job, but for the main/stable branches we don't | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/stable-')) || github.run_number }} | |
| # Only cancel intermediate pull request builds | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| jobs: | |
| lint: | |
| name: ${{ matrix.linter }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| linter: | |
| - gaplint | |
| - cpplint | |
| steps: | |
| - name: Check out the repository . . . | |
| uses: actions/checkout@v5 | |
| - name: Set up Python . . . | |
| uses: actions/setup-python@v6 | |
| - name: Install ${{ matrix.linter }} with pip . . . | |
| run: pip install ${{ matrix.linter }} | |
| - name: Run ${{ matrix.linter }} on the Digraphs package . . . | |
| run: bash etc/${{ matrix.linter }}.sh |