mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 10:46:28 +00:00
Run lint and isolated PostgreSQL tests in CI
This commit is contained in:
@@ -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
|
||||
Generated
+868
-17
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user