-
Notifications
You must be signed in to change notification settings - Fork 16
50 lines (45 loc) · 1.5 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
name: Cypress Tests
on:
push:
branches:
- refactor/#777
paths:
- frontend-monorepo/hanglog-service/**
- .github/**
- frontend-monorepo/.yarn/cache
- frontend-monorepo/.pnp.cjs
- frontend-monorepo/package.json
defaults:
run:
working-directory: frontend-monorepo/hanglog-service
jobs:
run-dev:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create env file
run: yarn install
touch .env
echo GOOGLE_API_KEY=${{ secrets.GOOGLE_API_KEY }} >> .env
echo GOOGLE_MAP_ID=${{ secrets.GOOGLE_MAP_ID }} >> .env
echo PROD_BASE_URL=${{ secrets.PROD_BASE_URL }} >> .env
cat .env
- name: Cypress run
uses: cypress-io/github-action@v5
with:
browser: chrome
start: yarn run serve:dev
wait-on: "http://localhost:3000"
record: false
working-directory: ./frontend-monorepo/hanglog-service
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cypress test failure message
if: failure()
uses: thollander/actions-comment-pull-request@v1
with:
message: |
로컬 cypress 테스트가 실패했습니다. [테스트 결과 자세히 보기](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}