-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (52 loc) · 1.5 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
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Unit tests
on:
pull_request:
schedule:
- cron: '0 2 * * *'
jobs:
unit-tests:
strategy:
fail-fast: false
max-parallel: 3
matrix:
rancher_version:
- head
- v2.9-head
- v2.10-head
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
run: npm run start-rancher
env:
RANCHER_VERSION: ${{ matrix.rancher_version }}
- name: Build package from the current branch
run: npm run build-npm
- name: Run e2e tests
run: npm run start-unit-tests
env:
RANCHER_VERSION: ${{ matrix.rancher_version }}
- name: Upload Cypress screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots-${{ matrix.rancher_version }}
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-${{ matrix.rancher_version }}
path: cypress/videos
retention-days: 7