mirror of https://github.com/vector-im/riot-web
Update commit status earlier in cypress workflow_run (#9263)
parent
d87f4b0336
commit
e3b13eb97c
|
@ -13,6 +13,7 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
actions: read
|
actions: read
|
||||||
issues: read
|
issues: read
|
||||||
|
statuses: write
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
outputs:
|
outputs:
|
||||||
uuid: ${{ steps.uuid.outputs.value }}
|
uuid: ${{ steps.uuid.outputs.value }}
|
||||||
|
@ -22,6 +23,16 @@ jobs:
|
||||||
commit_email: ${{ steps.commit.outputs.email }}
|
commit_email: ${{ steps.commit.outputs.email }}
|
||||||
percy_enable: ${{ steps.percy.outputs.value || '1' }}
|
percy_enable: ${{ steps.percy.outputs.value || '1' }}
|
||||||
steps:
|
steps:
|
||||||
|
# We create the status here and then update it to success/failure in the `report` stage
|
||||||
|
# This provides an easy link to this workflow_run from the PR before Cypress is done.
|
||||||
|
- uses: Sibz/github-status-action@v1
|
||||||
|
with:
|
||||||
|
authToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
state: pending
|
||||||
|
context: ${{ github.workflow }} / cypress (${{ github.event.workflow_run.event }} => ${{ github.event_name }})
|
||||||
|
sha: ${{ github.event.workflow_run.head_sha }}
|
||||||
|
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
|
|
||||||
- id: prdetails
|
- id: prdetails
|
||||||
if: github.event.workflow_run.event == 'pull_request'
|
if: github.event.workflow_run.event == 'pull_request'
|
||||||
uses: matrix-org/pr-details-action@v1.2
|
uses: matrix-org/pr-details-action@v1.2
|
||||||
|
@ -62,7 +73,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
actions: read
|
actions: read
|
||||||
statuses: write
|
|
||||||
issues: read
|
issues: read
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
environment: Cypress
|
environment: Cypress
|
||||||
|
@ -156,21 +166,21 @@ jobs:
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
|
report:
|
||||||
# This job cannot have a pretty name due to https://github.com/haya14busa/action-workflow_run-status/issues/158
|
name: Report results
|
||||||
cypress:
|
|
||||||
needs: tests
|
needs: tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
permissions:
|
permissions:
|
||||||
statuses: write
|
statuses: write
|
||||||
steps:
|
steps:
|
||||||
# Wire up the status check for this workflow_run action
|
- uses: Sibz/github-status-action@v1
|
||||||
- uses: haya14busa/action-workflow_run-status@967ed83efa565c257675ed70cfe5231f062ddd94 # v1.0.0
|
with:
|
||||||
|
authToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Check status
|
state: ${{ needs.tests.result }} == 'success' && 'success' || 'failure'
|
||||||
if: ${{ needs.tests.result != 'success' }}
|
context: ${{ github.workflow }} / cypress (${{ github.event.workflow_run.event }} => ${{ github.event_name }})
|
||||||
run: exit 1
|
sha: ${{ github.event.workflow_run.head_sha }}
|
||||||
|
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
|
|
||||||
store-benchmark:
|
store-benchmark:
|
||||||
needs: tests
|
needs: tests
|
||||||
|
|
Loading…
Reference in New Issue