-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (68 loc) 路 2.31 KB
/
Copy pathci.yml
File metadata and controls
72 lines (68 loc) 路 2.31 KB
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
68
69
70
71
72
name: CI
on:
pull_request:
workflow_call:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
commitlint:
# PR only: lints the PR's commits. On pushes to dev/stage the commits already passed
# commitlint on their PR, and the push before-SHA is unreliable (null on a branch's
# first push -> "Invalid revision range 0000...").
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/bootstrap
- name: Commitlint
run: pnpm commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}
verify:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 10
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DATABASE_ADMIN_URL: postgres://postgres:postgres@localhost:5432/oss_igaming_test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/oss_igaming_test
TEST_ADMIN_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
TEST_REDIS_URL: redis://localhost:6379
TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/oss_igaming_test
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/bootstrap
- name: Prepare migration database
run: pnpm db:setup:test
- name: Build migration runner
run: pnpm --filter @openora/core build
- name: Run migrations
run: pnpm db:migrate
# Fans out types, lint, format, boundaries, module shape, deprecations, unit
# + tool tests through turbo (parallel + cached). `build` runs implicitly as
# the `check:types` dependency.
- name: Verify
run: pnpm verify
- name: Drift check
run: pnpm check:drift