-
Notifications
You must be signed in to change notification settings - Fork 21
53 lines (48 loc) · 1.32 KB
/
test.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
name: test
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
run-test:
timeout-minutes: 10
runs-on: ubuntu-24.04
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: minute_test
ports:
- 5433:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: ".nvmrc"
cache: pnpm
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Prepare env files
run: |
cp packages/prisma/.env.test.sample packages/prisma/.env.test
cp packages/services/.env.test.sample packages/services/.env.test
cp packages/trpc/.env.test.sample packages/trpc/.env.test
cp apps/web/.env.test.sample apps/web/.env.test
- name: Run unit tests
run: pnpm test:unit