-
Notifications
You must be signed in to change notification settings - Fork 11
62 lines (61 loc) · 2.12 KB
/
github-actions.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
name: End-to-end tests
on: [pull_request]
jobs:
build-lint-unit-test:
runs-on: ubuntu-20.04 # pin ubuntu for no snapshot variance
env:
FORCE_COLOR: true # force colored output from yarn
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '16.17.1'
# cache: 'yarn' // uncomment after adding yarn.lock
- name: Install dependencies
run: yarn
- name: Run Build
run: yarn build
- name: Run lint
run: yarn lint
- name: Run unit tests
run: yarn test
integ-tests:
runs-on: ubuntu-20.04 # pin ubuntu for no snapshot variance
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '14.x'
- name: Install dependencies
run: yarn
- name: cypress run
uses: cypress-io/github-action@v6
with:
start: yarn start
wait-on: 'http://localhost:3333'
command: yarn test:cypress
working-directory: packages/iot-app-kit-visualizations
# after the test run completes
# store videos and any screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: packages/iot-app-kit-visualizations/cypress/screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: packages/iot-app-kit-visualizations/cypress/videos
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-snapshots
path: packages/iot-app-kit-visualizations/cypress/snapshots