-
Notifications
You must be signed in to change notification settings - Fork 13
49 lines (41 loc) · 1.11 KB
/
test.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
name: Unit Tests
# Skipping until Vue3 migration is complete
on:
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
jobs:
unit-test:
if: github.repository_owner == 'rancher'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Nodejs and npm
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup yarn
run: npm install -g yarn
- name: Setup Nodejs with yarn caching
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn
- name: Install dependencies
run: yarn
- name: Run tests
run: |
yarn test:ci
mkdir -p coverage-artifacts/coverage/unit
cp coverage/unit/coverage-final.json coverage-artifacts/coverage/coverage-unit.json
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: ${{github.run_number}}-${{github.run_attempt}}-coverage
path: coverage-artifacts/**/*