添加本地测试和CI测试同时支持
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Qumolama.d 2022-05-16 13:25:50 +08:00
parent f23a607148
commit db72ad3694
Signed by: Lama3L9R
GPG Key ID: 1762AFC05157CE18
2 changed files with 4 additions and 2 deletions

View File

@ -19,7 +19,7 @@ steps:
image: node:16
commands:
- yarn install
- yarn test
- env CI=1 yarn test
- name: notify
image: appleboy/drone-telegram
when:

View File

@ -20,7 +20,9 @@ beforeAll(() => {
writeFileSync('private.key', privateKey)
}
//config.database.url = 'mongodb://setup-database:27017/yggdrasil?readPreference=primary&appname=MongoDB%20Compass&directConnection=true&ssl=false'
if(process.env['CI']) {
config.database.url = 'mongodb://setup-database:27017/yggdrasil?readPreference=primary&appname=MongoDB%20Compass&directConnection=true&ssl=false'
}
return setup()
})