Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
11a8df2a
Unverified
Commit
11a8df2a
authored
May 12, 2023
by
Zach Pomerantz
Committed by
GitHub
May 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: report test failures via Slack (#6539)
* build: report test failures
parent
3726b6bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
1 deletion
+75
-1
action.yml
.github/actions/report/action.yml
+48
-0
test.yml
.github/workflows/test.yml
+27
-1
No files found.
.github/actions/report/action.yml
0 → 100644
View file @
11a8df2a
name
:
Report
description
:
Report test failures via Slack
inputs
:
name
:
description
:
The name of the failing test
required
:
true
SLACK_WEBHOOK_URL
:
description
:
The webhook URL to send the report to
required
:
true
runs
:
using
:
composite
steps
:
-
uses
:
slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
with
:
payload
:
|
{
"text": "${{ inputs.name }} failing on `${{ github.ref_name }}`",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ inputs.name }} failing on `${{ github.ref_name }}`:* <https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id }}|view failing action>"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "_This is blocking pull requests and branch promotions._\n_Please prioritize fixing the build._"
}
}
]
}
env
:
SLACK_WEBHOOK_URL
:
${{ inputs.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE
:
INCOMING_WEBHOOK
# The !oncall bot requires its own message:
-
uses
:
slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
with
:
payload
:
|
{
"text": "!oncall web"
}
env
:
SLACK_WEBHOOK_URL
:
${{ inputs.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE
:
INCOMING_WEBHOOK
.github/workflows/test.yml
View file @
11a8df2a
...
@@ -26,6 +26,11 @@ jobs:
...
@@ -26,6 +26,11 @@ jobs:
key
:
${{ runner.os }}-eslint-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
key
:
${{ runner.os }}-eslint-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
restore-keys
:
${{ runner.os }}-eslint-${{ hashFiles('**/yarn.lock') }}-
restore-keys
:
${{ runner.os }}-eslint-${{ hashFiles('**/yarn.lock') }}-
-
run
:
yarn lint
-
run
:
yarn lint
-
if
:
failure() && github.ref_name == 'main'
uses
:
./.github/actions/report
with
:
name
:
Lint
SLACK_WEBHOOK_URL
:
${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
typecheck
:
typecheck
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
...
@@ -39,6 +44,11 @@ jobs:
...
@@ -39,6 +44,11 @@ jobs:
key
:
${{ runner.os }}-tsc-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
key
:
${{ runner.os }}-tsc-${{ hashFiles('**/yarn.lock') }}-${{ github.run_id }}
restore-keys
:
${{ runner.os }}-tsc-${{ hashFiles('**/yarn.lock') }}-
restore-keys
:
${{ runner.os }}-tsc-${{ hashFiles('**/yarn.lock') }}-
-
run
:
yarn typecheck
-
run
:
yarn typecheck
-
if
:
failure() && github.ref_name == 'main'
uses
:
./.github/actions/report
with
:
name
:
Typecheck
SLACK_WEBHOOK_URL
:
${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
deps-tests
:
deps-tests
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
...
@@ -46,6 +56,11 @@ jobs:
...
@@ -46,6 +56,11 @@ jobs:
-
uses
:
actions/checkout@v3
-
uses
:
actions/checkout@v3
-
uses
:
./.github/actions/setup
-
uses
:
./.github/actions/setup
-
run
:
yarn yarn-deduplicate --strategy=highest --list --fail
-
run
:
yarn yarn-deduplicate --strategy=highest --list --fail
-
if
:
failure() && github.ref_name == 'main'
uses
:
./.github/actions/report
with
:
name
:
Dependency checks
SLACK_WEBHOOK_URL
:
${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
unit-tests
:
unit-tests
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
...
@@ -65,6 +80,11 @@ jobs:
...
@@ -65,6 +80,11 @@ jobs:
fail_ci_if_error
:
false
fail_ci_if_error
:
false
verbose
:
true
verbose
:
true
flags
:
unit-tests
flags
:
unit-tests
-
if
:
failure() && github.ref_name == 'main'
uses
:
./.github/actions/report
with
:
name
:
Unit tests
SLACK_WEBHOOK_URL
:
${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
build-e2e
:
build-e2e
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
...
@@ -138,9 +158,15 @@ jobs:
...
@@ -138,9 +158,15 @@ jobs:
# Included as a single job to check for cypress-test-matrix success, as a matrix cannot be checked.
# Included as a single job to check for cypress-test-matrix success, as a matrix cannot be checked.
cypress-tests
:
cypress-tests
:
if
:
${{ always() }}
if
:
always()
needs
:
[
cypress-test-matrix
]
needs
:
[
cypress-test-matrix
]
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
steps
:
steps
:
-
uses
:
actions/checkout@v3
-
if
:
needs.cypress-test-matrix.result != 'success'
-
if
:
needs.cypress-test-matrix.result != 'success'
run
:
exit
1
run
:
exit
1
-
if
:
failure() && github.ref_name == 'main'
uses
:
./.github/actions/report
with
:
name
:
Cypress tests
SLACK_WEBHOOK_URL
:
${{ secrets.SLACK_TEST_REPORTER_WEBHOOK }}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment