-
-
Notifications
You must be signed in to change notification settings - Fork 31
42 lines (35 loc) · 1009 Bytes
/
run-test.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
name: Run Tests
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
vitest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: false
- name: Checkout LFS
run: git lfs pull
- uses: actions/setup-node@v4
with:
node-version-file: "project/.nvmrc"
cache: "npm"
cache-dependency-path: "project/package.json"
- name: Check NPM Cache
id: cache-check
uses: actions/cache@v4
with:
path: ./project/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('./project/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ hashFiles('./project/package.json') }}
- name: Install NPM Dependencies
if: steps.cache-check.outputs.cache-hit != 'true'
run: npm install
working-directory: ./project
- name: Run Tests
run: npm run test
working-directory: ./project