Lint #1703
This file contains 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: | |
schedule: | |
# Every day at 3:30 AM UTC | |
- cron: '30 3 * * *' | |
jobs: | |
lint: | |
name: "${{ matrix.linter }}" | |
runs-on: ubuntu-latest | |
# Don't run this twice for PRs from branches in the same repository | |
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} | |
strategy: | |
fail-fast: false | |
matrix: | |
linter: | |
- gaplint | |
- cpplint | |
steps: | |
- name: "Check out the repository" | |
uses: actions/checkout@v3 | |
- name: "Set up Python" | |
uses: actions/setup-python@v4 | |
- 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 | |