Adds a GitHub Action to notify when preview link is live #644
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: Lintrunner | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} | |
| cancel-in-progress: true | |
| jobs: | |
| lintrunner: | |
| name: lintrunner | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout tutorials | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Lintrunner | |
| run: | | |
| pip install lintrunner==0.12.5 | |
| lintrunner init | |
| - name: Run lintrunner on all files - Linux | |
| run: | | |
| set +e | |
| if ! lintrunner -v --force-color --all-files --tee-json=lint.json; then | |
| echo "" | |
| echo -e "\e[1m\e[36mYou can reproduce these results locally by using \`lintrunner -m main\`.\e[0m" | |
| exit 1 | |
| fi |