I understand that gitlab isn't supported yet. But I'm purely using this to send a brief PASS/FAIL to my Slack channel.
It seems to be working locally after running these steps.
e2e-tests:
script:
- npm ci
- npm run e2e:ci
- npm run e2e:consolidate:report # consolidate test reports
- npm run e2e:report:send # sends consolidated report to Slack
variables:
SLACK_WEBHOOK: https://hooks.slack.com/services/XXXX
before_script:
- export SLACK_WEBHOOK_URL=$SLACK_WEBHOOK
> npx cypress-slack-reporter --report-dir mochareports/mochawesome.json --ci-provider none
{"level":30,"time":1618502686655,"pid":591,"hostname":"runner-x8zlwexr-project-25494770-concurrent-0","data":{"attachments":[{"color":"#36a64f","fallback":"Report available at mochareports/mochawesome.json/mochawesome.json","text":"Total Passed: 26","actions":[{"type":"button","text":"Test Report","url":"mochareports/mochawesome.json/mochawesome.json","style":"primary"},{"type":"button","text":"Build Logs","url":"undefined","style":"primary"}]},{"text":"","color":"#36a64f"}],"unfurl_links":false,"unfurl_media":false},"msg":"passing run"}
{"level":50,"time":1618502686660,"pid":591,"hostname":"runner-x8zlwexr-project-25494770-concurrent-0","e":{},"msg":"Unknown error occurred whilst sending slack message"}
(node:591) UnhandledPromiseRejectionWarning: Error: Error: An error occurred whilst sending slack message
at Object.exports.slackRunner (/e2e-tests/node_modules/cypress-slack-reporter/bin/slack/slack-alert.js:162:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:591) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:591) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.