-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (42 loc) · 1.29 KB
/
slack-notifiaction.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Check website every 6 hours
on:
schedule:
- cron: '0 */6 * * *'
jobs:
cypress_tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
- run: echo '${{ secrets.CYPRESS_ENV }}' > cypress.env.json
- run: echo '${{ secrets.ENV_LOCAL }}' > .env.local
- name: Cypress run
uses: cypress-io/github-action@v6
with:
install: yarn
build: yarn build
start: yarn start
browser: chrome
# - name: Cypress artifacts
# uses: actions/upload-artifact@v4
# if: always()
# with:
# name: cypress-videos
# path: cypress/videos/**/*
- name: Send Slack notification
uses: rtCamp/action-slack-notify@v2
if: failure()
env:
SLACK_CHANNEL: website-monitoring
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: 'STATUS: ${{ job.status }}'
SLACK_TITLE: WEBSITE MONITORING
SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_URL }}