-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (52 loc) · 1.59 KB
/
ci-tests-ts.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
name: 'Tests (TS)'
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'ts-services/**'
- 'ts-shared/**'
- 'ts-web/**'
- 'tsconfig.json'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'vitest.*'
env:
NODE_OPTIONS: '--max_old_space_size=4096'
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install pnpm
uses: pnpm/[email protected]
id: pnpm-install
with:
version: 8
- name: Setup pnpm cache
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Load cached Node dependencies
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
- name: Install Node dependencies
run: pnpm install -r
- name: Test
run: pnpm run test:coverage
- name: Coverage
uses: davelosert/vitest-coverage-report-action@v2