-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.6 KB
/
ci.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI/CD
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: bitnami/postgresql:latest
ports:
- 5432:5432
env:
POSTGRESQL_USERNAME: postgres
POSTGRESQL_PASSWORD: postgres
POSTGRESQL_DATABASE: plotwist_test
POSTGRESQL_REPLICATION_USE_PASSFILE: "no"
redis:
image: bitnami/redis:latest
ports:
- 6379:6379
env:
REDIS_PASSWORD: redis
localstack:
image: localstack/localstack
ports:
- 4566:4566
- 4576:4576
env:
SERVICES: sqs
DEFAULT_REGION: sa-east-1
AWS_ACCESS_KEY_ID: localkey
AWS_SECRET_ACCESS_KEY: localsecret
steps:
- uses: actions/checkout@v4
- name: Cache pnpm dependencies
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- uses: pnpm/action-setup@v2
with:
version: 7.x
- name: Install
run: pnpm install --no-frozen-lockfile
- name: Pretest
run: pnpm run pretest
- name: Test
run: pnpm run test
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/plotwist_test
REDIS_URL: redis://default:redis@127.0.0.1:6379
- name: Types
run: pnpm run typecheck
- name: Build
run: pnpm run build