Skip to content

Commit 65d1967

Browse files
committed
Update ci.yml
1 parent f83500c commit 65d1967

2 files changed

Lines changed: 3 additions & 73 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -54,81 +54,11 @@ jobs:
5454
- name: Run format check
5555
run: npm run format:check
5656

57-
db-migrations:
58-
runs-on: ubuntu-latest
59-
services:
60-
postgres:
61-
image: postgres:16
62-
env:
63-
POSTGRES_USER: postgres
64-
POSTGRES_PASSWORD: postgres
65-
POSTGRES_DB: migrations
66-
options: >-
67-
--health-cmd pg_isready
68-
--health-interval 10s
69-
--health-timeout 5s
70-
--health-retries 5
71-
ports:
72-
- 5433:5432
73-
74-
steps:
75-
- uses: actions/checkout@v4
76-
- uses: actions/setup-node@v4
77-
with:
78-
node-version: '22.x'
79-
cache: 'npm'
80-
- run: npm ci
81-
- run: cp .env.example .env
82-
- run: npm run build
83-
- run: bash ./scripts/db_run_migrations.sh
84-
- run: bash ./scripts/db_check_migrations.sh
85-
86-
test:
87-
name: Run Tests
88-
runs-on: ubuntu-latest
89-
strategy:
90-
fail-fast: false
91-
matrix:
92-
task: ['test']
93-
env:
94-
# Database configuration expected by the application
95-
DATABASE_URL: postgres://postgres:postgres@localhost:5432/event_indexer
96-
DATABASE_SSL_ENABLED: false
97-
MIGRATIONS_DATABASE_URL: postgres://postgres:postgres@localhost:5432/event_indexer
98-
services:
99-
postgres:
100-
image: postgres:16-alpine
101-
env:
102-
POSTGRES_DB: event_indexer
103-
POSTGRES_USER: postgres
104-
POSTGRES_PASSWORD: postgres
105-
options: >-
106-
--health-cmd pg_isready
107-
--health-interval 10s
108-
--health-timeout 5s
109-
--health-retries 5
110-
ports:
111-
- 5432:5432
112-
steps:
113-
- name: Checkout code
114-
uses: actions/checkout@v4
115-
116-
- name: Setup Node.js
117-
uses: actions/setup-node@v4
118-
with:
119-
node-version: '22'
120-
cache: 'npm'
121-
122-
- name: Install dependencies
123-
run: npm ci
124-
125-
- name: Run unit tests
126-
run: npm test
12757

12858
build:
12959
name: Build Application
13060
runs-on: ubuntu-latest
131-
needs: [lint, test]
61+
needs: [lint]
13262

13363
steps:
13464
- name: Checkout code

.sample.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
PORT=4242
22
ALLOW_CORS=true
33
NODE_ENV=development
4-
DATABASE_URL=
5-
MIGRATIONS_DATABASE_URL=
4+
DATABASE_URL=postgres://postgres:postgres@localhost:5432/event_indexer
5+
MIGRATIONS_DATABASE_URL=postgres://postgres:postgres@localhost:5432/migrations
66
DATABASE_SSL_ENABLED=false
77
DATABASE_CA_PATH=
88
JWT_SECRET=test_secret

0 commit comments

Comments
 (0)