Unverified Commit c436a83c authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

tweak deploy test jobs (#66856)

- remove fail fast so we can get a full picture of what's failing
- remove alerting/retrying to existing job

---------
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent ce69888a
......@@ -2,13 +2,14 @@ name: retry-tests
on:
workflow_run:
workflows: ['build-and-test']
workflows: ['build-and-test', 'test-e2e-deploy-release']
branches: [canary]
types:
- completed
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_CANARY_SLACK_WEBHOOK_URL }}
SLACK_DEPLOY_TEST_WEBHOOK_URL: ${{ secrets.BROKEN_DEPLOY_SLACK_WEBHOOK_URL }}
permissions:
actions: write
......@@ -16,7 +17,16 @@ permissions:
jobs:
retry-on-failure:
name: retry failed jobs
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < 3 && github.repository == 'vercel/next.js' }}
# Retry the build-and-test workflow up to 3 times and the test-e2e-deploy-release workflow up to 2 times.
if: >-
${{
github.event.workflow_run.conclusion == 'failure' &&
github.repository == 'vercel/next.js' &&
(
(github.event.workflow_run.name == 'build-and-test' && github.event.workflow_run.run_attempt < 3) ||
(github.event.workflow_run.name == 'test-e2e-deploy-release' && github.event.workflow_run.run_attempt < 2)
)
}}
runs-on: ubuntu-latest
steps:
- name: send retry request to GitHub API
......@@ -31,7 +41,14 @@ jobs:
report-failure:
name: report failure to slack
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt >= 3 && !github.event.workflow_run.head_repository.fork }}
# Report the failure to Slack if the build-and-test workflow has failed 3 times
if: >-
${{
github.event.workflow_run.name == 'build-and-test' &&
github.event.workflow_run.conclusion == 'failure' &&
github.event.workflow_run.run_attempt >= 3 &&
!github.event.workflow_run.head_repository.fork
}}
runs-on: ubuntu-latest
steps:
- name: send webhook
......@@ -48,3 +65,27 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}
report-deploy-test-failure:
name: report failure to slack
# Report the failure to Slack if the test-e2e-deploy-release workflow has failed 2 times
if: >-
${{
github.event.workflow_run.name == 'test-e2e-deploy-release' &&
github.event.workflow_run.conclusion == 'failure' &&
github.event.workflow_run.run_attempt >= 2 &&
!github.event.workflow_run.head_repository.fork
}}
runs-on: ubuntu-latest
steps:
- name: send webhook
uses: slackapi/slack-github-action@v1.25.0
with:
payload: |
{
"commit_title": ${{ toJSON(github.event.workflow_run.display_title) }},
"commit_url": "github.com/${{ github.repository }}/commit/${{ github.event.workflow_run.head_sha }}",
"workflow_run_url": "github.com/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/attempts/${{ github.event.workflow_run.run_attempt }}"
}
env:
SLACK_DEPLOY_TEST_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}
name: Test E2E (Vercel Deploy), scheduled
name: test-e2e-deploy-release
on:
# run on every release/prerelease
......@@ -10,7 +10,6 @@ on:
env:
VERCEL_TEST_TEAM: vtest314-next-e2e-tests
VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_DEPLOY_SLACK_WEBHOOK_URL }}
DATADOG_API_KEY: ${{ secrets.DATA_DOG_API_KEY }}
DD_ENV: 'ci'
......@@ -45,7 +44,7 @@ jobs:
uses: ./.github/workflows/build_reusable.yml
secrets: inherit
strategy:
fail-fast: true
fail-fast: false
matrix:
group: [1/5, 2/5, 3/5, 4/5, 5/5, 6/6]
with:
......@@ -75,21 +74,3 @@ jobs:
if [ -d ./test/test-junit-report ]; then
DD_ENV=ci npx @datadog/datadog-ci@2.23.1 junit upload --tags test.type:deploy --service nextjs ./test/test-junit-report
fi
report-failure:
name: report failure to slack
needs: test-deploy
if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
runs-on: ubuntu-latest
steps:
- name: send webhook
uses: slackapi/slack-github-action@v1.25.0
with:
payload: |
{
"commit_title": ${{ toJSON(github.event.workflow_run.display_title) }},
"commit_url": "github.com/${{ github.repository }}/commit/${{ github.event.workflow_run.head_sha }}",
"workflow_run_url": "github.com/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/attempts/${{ github.event.workflow_run.run_attempt }}"
}
env:
SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment