mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 11:06:28 +00:00
39 lines
913 B
YAML
39 lines
913 B
YAML
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: '26.13.1'
|
|
cache: npm
|
|
- run: npm ci
|
|
- run: npm run lint
|
|
- run: npm test -- --runInBand
|