only run in test mode if couch url is not passed

This commit is contained in:
Martin McKeaveney 2022-09-26 10:40:37 +01:00
parent 2102530efd
commit 1fdff22c64
3 changed files with 20 additions and 20 deletions

View File

@ -51,16 +51,16 @@ jobs:
- run: yarn bootstrap
- run: yarn lint
- run: yarn build
# - run: yarn test
# env:
# CI: true
# name: Budibase CI
# - uses: codecov/codecov-action@v1
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# files: ./packages/server/coverage/clover.xml
# name: codecov-umbrella
# verbose: true
- run: yarn test
env:
CI: true
name: Budibase CI
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./packages/server/coverage/clover.xml
name: codecov-umbrella
verbose: true
- name: QA Core Integration Tests
run: |

View File

@ -1,5 +1,5 @@
const core = require("@budibase/backend-core")
// const env = require("../environment")
const env = require("../environment")
exports.init = () => {
const dbConfig = {
@ -7,10 +7,10 @@ exports.init = () => {
find: true,
}
// if (env.isTest()) {
// dbConfig.inMemory = true
// dbConfig.allDbs = true
// }
if (env.isTest() && !env.COUCH_DB_URL) {
dbConfig.inMemory = true
dbConfig.allDbs = true
}
core.init({ db: dbConfig })
}

View File

@ -1,11 +1,11 @@
const core = require("@budibase/backend-core")
// const env = require("../environment")
const env = require("../environment")
exports.init = () => {
const dbConfig = {}
// if (env.isTest()) {
// dbConfig.inMemory = true
// dbConfig.allDbs = true
// }
if (env.isTest() && !env.COUCH_DB_URL) {
dbConfig.inMemory = true
dbConfig.allDbs = true
}
core.init({ db: dbConfig })
}