Skip to content

Commit 01bea7f

Browse files
committed
fix ci
1 parent 20b76e5 commit 01bea7f

File tree

4 files changed

+7
-51
lines changed

4 files changed

+7
-51
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
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

.travis.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

config/default.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
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
}

test/preparation/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as config from "config";
33
import * as fs from "fs";
44
import * 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');
77
const schema = fs.readFileSync(path.join(__dirname, 'schema.sql'), 'utf-8');
88
const pool = new Pool(dbConfig);
99

0 commit comments

Comments
 (0)