-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1.13 KB
/
pr.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
name: CI
on:
pull_request:
branches: ["*"]
push:
branches: ["main"]
merge_group:
env:
HUSKY: 0
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Start setting up postgres container"
run: |
# start preparing the postgres container, if you run tests too soon, it will fail
docker run -d -p 5432:5432 -e POSTGRES_DB=typeshift -e POSTGRES_PASSWORD=password postgres:14-alpine
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
- name: Setup Node 18
uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- name: Install deps
run: pnpm install && pnpm postinstall-steps
- name: Build and lint and type-check
run: pnpm build && pnpm turbo --env-mode=loose lint test-ci typecheck
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/typeshift?sslmode=disable
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}