Bump actions/checkout from 5.0.1 to 6.0.0 (#259) #923
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: | |
| push: | |
| branches: | |
| - main | |
| - 'gh/**/base' # ghstack base branches | |
| pull_request: | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} | |
| cancel-in-progress: true | |
| jobs: | |
| optional-lint: | |
| name: Optional Lint | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: misspell # Check spelling | |
| uses: reviewdog/action-misspell@v1 | |
| with: | |
| github_token: ${{ secrets.github_token }} | |
| locale: "US" | |
| reporter: github-pr-check | |
| level: info | |
| filter_mode: diff_context | |
| - name: shellcheck # Static check shell scripts | |
| uses: reviewdog/action-shellcheck@v1 | |
| with: | |
| github_token: ${{ secrets.github_token }} | |
| reporter: github-pr-check | |
| level: info | |
| filter_mode: diff_context | |
| enforce-style: | |
| name: Enforce style | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install onnx-ir | |
| run: | | |
| # Install dependencies | |
| uv pip install --system -r requirements-dev.txt | |
| # Install packages | |
| uv pip install --system -e . | |
| lintrunner init | |
| - name: Run lintrunner on all files | |
| run: | | |
| set +e | |
| if ! lintrunner --force-color --all-files --tee-json=lint.json -v; then | |
| echo "" | |
| echo -e "\e[1m\e[36mYou can reproduce these results locally by using \`lintrunner\`.\e[0m" | |
| echo -e "\e[1m\e[36mSee https://github.com/onnx/onnx_ir/blob/main/CONTRIBUTING.md for setup instructions.\e[0m" | |
| exit 1 | |
| fi | |
| - name: Produce SARIF | |
| if: always() | |
| run: | | |
| python -m lintrunner_adapters to-sarif lint.json lintrunner.sarif | |
| - name: Upload SARIF file | |
| # Use always() to always upload SARIF even if lintrunner returns with error code | |
| # To toggle linter comments in the files page, press `i` on the keyboard | |
| if: always() | |
| continue-on-error: true | |
| uses: github/codeql-action/[email protected] | |
| with: | |
| # Path to SARIF file relative to the root of the repository | |
| sarif_file: lintrunner.sarif | |
| category: lintrunner | |
| checkout_path: ${{ github.workspace }} |