-
Notifications
You must be signed in to change notification settings - Fork 133
50 lines (48 loc) · 1.29 KB
/
unit_tests.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
name: Unit Tests
on:
push:
branches:
- master
- bso
paths-ignore:
- "docs/**"
pull_request:
paths-ignore:
- "docs/**"
jobs:
test:
name: Node v${{ matrix.node_version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
matrix:
node_version: [20.15.0]
os: [ubuntu-latest]
concurrency:
group: ${{ github.ref_name }}-unittests
cancel-in-progress: true
steps:
- name: Checkout Project
uses: actions/checkout@v4
- run: corepack enable && corepack install
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: yarn
- name: Restore CI Cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn remove zlib-sync && yarn install
- name: Copy Configuration
run: |
pushd src &&
cp config.example.ts config.ts &&
popd && cp .env.test .env
- name: Generate Prisma Clients
run: yarn gen
- name: Test
run: yarn test:ci:unit