-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.18 KB
/
unit-tests.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
name: Unit tests
on:
pull_request:
schedule:
- cron: '0 2 * * *'
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
env:
NODE_VERSION: current
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Deploy rancher head
run: npm run start-rancher
- name: Build package from the current branch
run: npm run build-npm
- name: Run e2e tests
run: npm run start-unit-tests
- name: Upload Cypress screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots-basics-unit-tests
path: cypress/screenshots
retention-days: 7
if-no-files-found: ignore
- name: Upload Cypress videos
# Test run video is always captured, so this action uses "always()" condition
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-videos-basics-unit-tests
path: cypress/videos
retention-days: 7