Smokeshow #3129
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: Smokeshow | |
| on: | |
| workflow_run: # zizmor: ignore[dangerous-triggers] | |
| workflows: [Test] | |
| types: [completed] | |
| permissions: {} | |
| jobs: | |
| smokeshow: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| statuses: write | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| # Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum. | |
| # See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837 | |
| version: "0.11.4" | |
| cache-dependency-glob: | | |
| pyproject.toml | |
| uv.lock | |
| - run: uv sync --locked --no-dev --group github-actions | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: coverage-html | |
| path: htmlcov | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| run-id: ${{ github.event.workflow_run.id }} | |
| # Try 5 times to upload coverage to smokeshow | |
| - name: Upload coverage to Smokeshow | |
| run: | | |
| for i in 1 2 3 4 5; do | |
| if uv run smokeshow upload htmlcov; then | |
| echo "Smokeshow upload success!" | |
| break | |
| fi | |
| echo "Smokeshow upload error, sleep 1 sec and try again." | |
| sleep 1 | |
| done | |
| env: | |
| SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} | |
| SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 99 | |
| SMOKESHOW_GITHUB_CONTEXT: coverage | |
| SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }} | |
| SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }} # zizmor: ignore[secrets-outside-env] |