-
Notifications
You must be signed in to change notification settings - Fork 18
57 lines (54 loc) · 1.75 KB
/
vitest.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
name: "Tests: vitest"
on:
push:
branches: ["main", "ragezbla/89-vitest-gh-actions"] # TODO remove after checking it works
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
schedule:
- cron: "45 15 * * 4"
env:
CACHE_PATH: ./*
CACHE_KEY: vitest-cache-${{ github.sha }}
jobs:
setup:
name: Setup 🛫
strategy:
matrix:
node-version: [16, 18]
runs-on: ubuntu-latest
steps:
- name: Setup Cache
uses: actions/cache@v3
with:
path: ${{ env.CACHE_PATH }}
key: ${{ env.CACHE_KEY }}-${{ matrix.node-version }}
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Yarn/ Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- name: Install Dependencies
run: yarn install --immutable
# this is needed to generate things like tsconfig declerations
- name: Prepare Nuxt
run: yarn prepare:ci
run-pinia-tests:
runs-on: ubuntu-latest
name: Running Pinia Tests 🚀
needs: setup
strategy:
matrix:
node-version: [16, 18]
steps:
- name: Load Cache
uses: actions/cache@v3
with:
path: ${{ env.CACHE_PATH }}
key: ${{ env.CACHE_KEY }}-${{ matrix.node-version }}
- name: Run Vitest
run: yarn run test:pinia