blob: efa1b6ea98f17a4be3ddcadaa179b2813ef5c994 [file] [log] [blame]
name: Frontend e2e test for plugin
on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
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.4.13
ports:
- 2379:2379
- 2380:2380
env:
ALLOW_NONE_AUTHENTICATION: yes
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.5
with:
node-version: 14.x
- name: Setup golang environment
uses: actions/setup-go@v2.1.3
with:
go-version: '1.13'
- name: Start manager-api
working-directory: ./api
run: |
sed -i 's@# - dubbo-proxy@- dubbo-proxy@' ./conf/conf.yaml
nohup go run ./cmd/manager &
- name: Cache node_modules
uses: actions/cache@v2.1.4
id: yarn-cache
with:
path: '*/node_modules'
key: '${{ runner.os }}-yarn-cache0-${{ hashFiles(''**/yarn.lock'') }}'
restore-keys: |
${{ runner.os }}-yarn-cache0
- name: Cache Cypress binary
uses: actions/cache@v2.1.4
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
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Start frontend then test
run: yarn test-plugin:e2e
- name: Archive code coverage results
uses: actions/upload-artifact@v2
if: always()
with:
name: cypress-report
path: |
web/cypress/videos
web/cypress/screenshots
retention-days: 5