diff --git a/.github/workflows/smokeshow.yml b/.github/workflows/smokeshow.yml new file mode 100644 index 0000000..c2b2278 --- /dev/null +++ b/.github/workflows/smokeshow.yml @@ -0,0 +1,33 @@ +name: Smokeshow + +on: + workflow_run: + workflows: [Tests] + types: [completed] + +permissions: + statuses: write + +jobs: + smokeshow: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ubuntu-latest + environment: smokeshow + steps: + - uses: actions/setup-python@v4 + with: + python-version: '3.8' + - run: pip install smokeshow + - uses: dawidd6/action-download-artifact@v2 + with: + workflow: test.yml + commit: ${{ github.event.workflow_run.head_sha }} + - run: smokeshow upload coverage-html + env: + SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} + # 5 is set here while V2 is in development and coverage is far from complete + SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 91 + 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 }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b3e79e..2b10df2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,11 +5,6 @@ on: [push] jobs: test: environment: test - env: - SMOKESHOW_GITHUB_STATUS_DESCRIPTION: CLI Coverage {coverage-percentage} - SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 50 - SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }} runs-on: ubuntu-latest strategy: matrix: @@ -31,9 +26,9 @@ jobs: - name: Report coverage run: | coverage report - coverage html - - name: Install smokeshow and upload coverage - if: ${{ matrix.python-minor-version == 8 }} - run: | - pip install smokeshow - smokeshow upload htmlcov/index.html + coverage html --show-contexts --title "runtime_generics coverage for ${{ github.sha }}" + - name: Store coverage html + uses: actions/upload-artifact@v3 + with: + name: coverage-html + path: htmlcov \ No newline at end of file