Skip to content

Commit

Permalink
pg ci fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timgit committed Jul 2, 2023
1 parent 133543d commit fa1ef24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -34,6 +34,8 @@ jobs:

- name: Test
run: npm run cover
env:
POSTGRES_HOST: postgres

- name: Coveralls
uses: coverallsapp/github-action@v2
Expand Down
12 changes: 4 additions & 8 deletions test/testHelper.js
Expand Up @@ -28,17 +28,13 @@ function getConnectionString () {

function getConfig (options = {}) {
const config = require('./config.json')
const inTravis = !!process.env.TRAVIS

if (inTravis) {
config.password = ''
config.schema = process.env.TRAVIS_JOB_ID
config.user = process.env.PGUSER
config.port = process.env.PGPORT
}
config.host = process.env.POSTGRES_HOST || config.host
config.port = process.env.POSTGRES_PORT || config.port
config.password = process.env.POSTGRES_PASSWORD || config.password

if (options.testKey) {
config.schema = `pgboss${sha1(options.testKey).slice(-10)}${inTravis ? '_' + config.schema : ''}`
config.schema = `pgboss${sha1(options.testKey).slice(-10)}`
}

config.schema = config.schema || 'pgboss'
Expand Down

0 comments on commit fa1ef24

Please sign in to comment.