Run lint and isolated PostgreSQL tests in CI

This commit is contained in:
Mohamad Ihsan
2026-11-24 22:57:43 +07:00
parent 3902a74d6f
commit 7927eeeac4
3 changed files with 907 additions and 18 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Backend checks
on:
push:
pull_request:
permissions:
contents: read
jobs:
backend:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:18
env:
POSTGRES_USER: topup_test
POSTGRES_PASSWORD: fixture
POSTGRES_DB: topup_loadbalance_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U topup_test -d topup_loadbalance_test"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
NODE_ENV: testing
TOPUP_TEST_LOAD_BALANCE_DB_URL: postgresql://topup_test:fixture@127.0.0.1:5432/topup_loadbalance_test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: npm
- run: npm ci
- run: npm run lint
- run: npm test -- --runInBand
+868 -17
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -24,7 +24,7 @@
"homepage": "https://github.com/mohamadihsan/topuponline#readme",
"dependencies": {
"axios": "^1.7.7",
"bcrypt": "^4.0.1",
"bcrypt": "^5.1.1",
"body-parser": "^1.19.0",
"check-internet-connected": "^2.0.6",
"cors": "^2.8.5",