Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added slack notification #759

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
run: |
mkdir mochareports
npm run generate:html:report

- name: upload report
uses: actions/upload-artifact@v4
if: failure()
Expand All @@ -71,3 +70,4 @@ jobs:
run: npm run cy:notify -- --custom-text="Environment ${{ inputs.environment }}, See more information https://github.com/DFE-Digital/Dfe.Academies.External/actions/runs/${{github.run_id}}"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

2 changes: 1 addition & 1 deletion Dfe.Academies.External.Web/CypressTests/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig({
reporterEnabled: 'mochawesome',
mochawesomeReporterOptions: {
reportDir: 'cypress/reports/mocha', // added this for slack messaging plugin
quiet: true, // Fixed typo
quiet: true,
overwrite: false,
html: false,
json: true,
Expand Down
13 changes: 9 additions & 4 deletions Dfe.Academies.External.Web/CypressTests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"scripts": {
"cy:open": "cypress open --browser electron",
"cy:run": "cypress run --browser electron" ,
"cy:notify": "cypress-slack-reporter",
"lint": "eslint ."
"cy:notify": "node ./sendSlackNotification.js",
"lint": "eslint .",
"generate:html:report": "mochawesome-merge ./cypress/reports/*.json > mochareports/report.json && mochawesome-report-generator mochareports/report.json"

},
"keywords": [
"regression",
Expand All @@ -20,7 +22,9 @@
},
"contributors": [
"Dan Good",
"Chris Sherlock"
"Chris Sherlock",
"Fahad Darwish",
"Richika Dogra"
],
"license": "ISC",
"bugs": {
Expand All @@ -43,6 +47,7 @@
"cypress-axe": "^1.4.0",
"eslint": "^9.6.0",
"eslint-plugin-cypress": "^3.0.0",
"zaproxy": "^2.0.0-rc.1"
"zaproxy": "^2.0.0-rc.1",
"cypress-multi-reporters": "^1.6.1"
}
}
Loading