Browse Source

添加本地测试和CI测试同时支持

master
Qumolama.d 2 months ago
parent
commit
db72ad3694
Signed by: Lama3L9R
GPG Key ID: 1762AFC05157CE18
  1. 2
      .drone.yml
  2. 4
      tests/routings/authenticate.test.js

2
.drone.yml

@ -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:

4
tests/routings/authenticate.test.js

@ -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()
})

Loading…
Cancel
Save