forked from apache/apisix-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (84 loc) · 2.29 KB
/
frontend-plugin-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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Frontend e2e test for plugin
on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true
env:
CYPRESS_CACHE_FOLDER: cypress/cache
defaults:
run:
working-directory: web
jobs:
web-e2e:
name: Frontend e2e test
runs-on: ubuntu-latest
services:
etcd:
image: bitnami/etcd:3.5.2
ports:
- 2379:2379
- 2380:2380
env:
ALLOW_NONE_AUTHENTICATION: yes
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 14.x
cache: 'yarn'
cache-dependency-path: web/yarn.lock
- name: Setup golang environment
uses: actions/[email protected]
with:
go-version: '1.15'
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dag-to-lua
working-directory: ./
run: make dag-lib
- name: Start manager-api
working-directory: ./api
run: |
sed -i 's@# - dubbo-proxy@- dubbo-proxy@' ./conf/conf.yaml
nohup go run ./main.go &
- name: Cache Cypress binary
uses: actions/[email protected]
id: cypress-binary-cache
with:
path: '*/cypress/cache'
key: cypress-${{ runner.os }}-cypress-cache0-${{ hashFiles('**/package.json') }}
restore-keys: |
cypress-${{ runner.os }}-cypress-cache0
- name: Install dependencies
run: yarn
- name: Start frontend then test
run: yarn test-plugin:e2e
- name: Archive code coverage results
uses: actions/[email protected]
if: always()
with:
name: cypress-report
path: |
web/cypress/videos
web/cypress/screenshots
retention-days: 5