-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (94 loc) · 2.82 KB
/
ci.yml
File metadata and controls
123 lines (94 loc) · 2.82 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: CI
on:
push:
branches: [main]
pull_request:
paths-ignore:
- '*.md'
- 'docs/**'
- 'website/**'
- '.takt/**'
- '.claude/**'
- 'LICENSE'
- '.gitignore'
# 同じブランチ/PRの古いワークフローをキャンセル
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Format check
run: pnpm format
- name: Lint
run: pnpm lint
- name: Build
run: pnpm build
- name: Type check
run: pnpm typecheck
test-node:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_DB: durably
POSTGRES_USER: durably
POSTGRES_PASSWORD: durably
ports:
- '55432:5432'
options: >-
--health-cmd "pg_isready -U durably -d durably"
--health-interval 2s
--health-timeout 2s
--health-retries 20
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Test (Node.js + PostgreSQL)
run: pnpm --filter @coji/durably test:node
test-browser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Get Playwright version
id: playwright-version
run: echo "version=$(pnpm --filter @coji/durably exec playwright --version | head -1)" >> $GITHUB_OUTPUT
- name: Cache Playwright browsers
uses: actions/cache@v5
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm --filter @coji/durably exec playwright install --with-deps chromium
- name: Install Playwright system deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: pnpm --filter @coji/durably exec playwright install-deps chromium
- name: Test (Browser)
run: pnpm test:browser
- name: Test (React)
run: pnpm test:react