-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.17 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
50
51
52
53
54
55
56
57
58
name: Build + Test
on:
push:
branches:
- main
paths:
- '.github/workflows/test.yml'
- 'pnpm-lock.yaml'
- 'src/**/*.ts'
- 'src/**/*.vue'
- 'tests/unit/*.ts'
pull_request:
paths:
- '.github/workflows/test.yml'
- 'pnpm-lock.yaml'
- 'src/**/*.ts'
- 'src/**/*.vue'
- 'tests/unit/*.ts'
workflow_dispatch:
concurrency:
group: test-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
env:
DEBUG: 0
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build
run: pnpm build
- name: Test
run: pnpm test
- name: Component Coverage
uses: davelosert/vitest-coverage-report-action@v1.4.0
if: ${{ always() }}
with:
working-directory: ./
vite-config-path: ./vite.config.ts