File tree Expand file tree Collapse file tree 7 files changed +1103
-13
lines changed
Expand file tree Collapse file tree 7 files changed +1103
-13
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+
13+ services :
14+ postgres :
15+ image : postgres:16
16+ env :
17+ POSTGRES_USER : postgres
18+ POSTGRES_PASSWORD : postgres
19+ POSTGRES_DB : blog_api_test
20+ ports :
21+ - 5432:5432
22+ options : >-
23+ --health-cmd="pg_isready -U postgres"
24+ --health-interval=10s
25+ --health-timeout=5s
26+ --health-retries=5
27+
28+ env :
29+ DATABASE_URL : postgres://postgres:postgres@localhost:5432/blog_api_test
30+ NODE_ENV : test
31+ ACCESS_TOKEN_SECRET : test-access-secret
32+ REFRESH_TOKEN_SECRET : test-refresh-secret
33+
34+ steps :
35+ - name : Checkout repo
36+ uses : actions/checkout@v4
37+
38+ - name : Setup Node
39+ uses : actions/setup-node@v4
40+ with :
41+ node-version : 20
42+
43+ - name : Enable pnpm
44+ run : corepack enable
45+
46+ - name : Install dependencies
47+ run : pnpm install --frozen-lockfile
48+
49+ - name : Run DB migrations
50+ run : pnpm db:migrate
51+
52+ - name : Run tests
53+ run : pnpm test
Original file line number Diff line number Diff line change 1+ ALTER TABLE " refresh_tokens" ADD COLUMN " family_id" uuid NOT NULL ;-- > statement-breakpoint
2+ ALTER TABLE " refresh_tokens" ADD COLUMN " ip_address" text ;-- > statement-breakpoint
3+ ALTER TABLE " refresh_tokens" ADD COLUMN " user_agent" text ;-- > statement-breakpoint
4+ CREATE INDEX "refresh_tokens_family_idx " ON " refresh_tokens" USING btree (" family_id" );
You can’t perform that action at this time.
0 commit comments