-
-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (38 loc) · 1.06 KB
/
pr-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
name: Test the PR
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-and-test:
name: Build and test with Node.js ${{ matrix.node-version }} and ${{ matrix.db }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20] # See supported Node.js release schedule at https://nodejs.org/en/about/releases
db: [postgresql, mysql, mongodb, sqlite]
env:
DB_PROVIDER: ${{ matrix.db }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install modules
run: pnpm install
- name: Check code formatting
run: pnpm run lint
- name: Generate Prisma Client
run: pnpm run prisma:gen
- name: Build
run: pnpm run build
- name: Run unit tests
run: pnpm run test