-
-
Notifications
You must be signed in to change notification settings - Fork 12
70 lines (59 loc) · 1.61 KB
/
dashboard-run-test.yaml
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
---
name: Dashboard Tests with nitric run
on:
push:
branches:
- main
- develop
pull_request:
concurrency:
group: ci-dash-run-tests-${{ github.ref_name }}
cancel-in-progress: true
env:
GOPROXY: https://proxy.golang.org
FATHOM_SITE: FAKE1234
jobs:
nitric-dashboard:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: cli
- uses: actions/setup-node@v4
with:
node-version: 21
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Build Nitric
run: |
cd ${{ github.workspace }}/cli
make build
mv bin/nitric $(go env GOPATH)/bin/nitric
- name: Run nitric run with test-app in the background
run: |
cd ${{ github.workspace }}/cli/pkg/dashboard/frontend/test-app
yarn install
nitric run --ci &
sleep 15
- name: Run Tests
uses: cypress-io/github-action@v5
with:
install: false
wait-on: "http://localhost:49152"
# wait for 3 minutes for the server to respond
wait-on-timeout: 180
working-directory: cli/pkg/dashboard/frontend
browser: chrome
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cli/pkg/dashboard/frontend/cypress/screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: cli/pkg/dashboard/frontend/cypress/videos