File tree Expand file tree Collapse file tree 4 files changed +7
-51
lines changed
Expand file tree Collapse file tree 4 files changed +7
-51
lines changed Original file line number Diff line number Diff line change 1414 image : postgres:12
1515 env :
1616 POSTGRES_USER : postgres
17- POSTGRES_DB : travis_ci_test
17+ POSTGRES_PASSWORD : test_db_password
18+ POSTGRES_DB : ci_test
1819 ports :
1920 - 5432:5432
2021 options : >-
@@ -31,28 +32,14 @@ jobs:
3132 uses : actions/setup-node@v6
3233 with :
3334 node-version : ' lts/*'
35+ cache : npm
3436
3537 - name : Install dependencies
3638 run : npm ci
3739
3840 - name : Lint code
3941 run : npm run lint
4042
41- - name : Build
42- run : npm run build
43-
44- - name : Wait for Postgres
45- run : |
46- for i in {1..30}; do
47- pg_isready -h localhost -p 5432 -U postgres && break || sleep 1;
48- done
49- env :
50- PGPASSWORD : ' '
51-
52- - name : Create test database
53- run : |
54- psql -c "create database travis_ci_test;" -U postgres || true
55-
5643 - name : Run DB setup script
5744 run : npm run setup-db
5845
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66 "user" : " rx_reactive_tester" ,
77 "password" : " 1esdf3143"
88 },
9- "travis -test" : {
9+ "ci -test" : {
1010 "host" : " localhost" ,
1111 "port" : 5432 ,
12- "database" : " travis_ci_test " ,
12+ "database" : " ci_test " ,
1313 "user" : " postgres" ,
14- "password" : " "
14+ "password" : " test_db_password "
1515 }
1616}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as config from "config";
33import * as fs from "fs" ;
44import * as path from "path" ;
55
6- const dbConfig = config . get ( process . env . NODE_ENV === 'travis ' ? 'travis -test' : 'test' ) ;
6+ const dbConfig = config . get ( process . env . CI === 'true ' ? 'ci -test' : 'test' ) ;
77const schema = fs . readFileSync ( path . join ( __dirname , 'schema.sql' ) , 'utf-8' ) ;
88const pool = new Pool ( dbConfig ) ;
99
You can’t perform that action at this time.
0 commit comments