-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (54 loc) · 1.42 KB
/
frontend-e2e-test.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Frontend E2E Test
on:
push:
branches:
- develop
- main
paths:
- frontend/**
pull_request:
branches:
- develop
- main
paths:
- frontend/**
defaults:
run:
working-directory: frontend
permissions:
checks: write
jobs:
cypress:
runs-on: ubuntu-latest
steps:
- name: Set up repository
uses: actions/checkout@v3
- name : Set up Node 18.16.0
uses: actions/setup-node@v3
with:
node-version: 18.16.0
- name: Cache node_modules
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
if: steps.cache.outputs.cache-hit != 'true'
- name: Run Cypress
uses: cypress-io/github-action@v5
with:
working-directory: frontend
start: npm run local
- name: Send slack notification if test failed
if: ${{ failure() }}
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: E2E 테스트 실패
fields: workflow, job, pullRequest, author, action, eventName, took, commit
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FRONTEND }}