Skip to content

Commit a93320e

Browse files
committed
test: setup appid via env
1 parent 35e4663 commit a93320e

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ jobs:
1414
node-version: 16
1515
- run: npm ci
1616
- run: npm test
17+
env:
18+
SERVER_URL: https://qvnm6ag2.api.lncldglobal.com
19+
APPID: QvNM6AG2khJtBQo6WRMWqfLV-gzGzoHsz
20+
APPKEY: be2YmUduiuEnCB2VR9bLRnnV
21+
MASTERKEY: ${{ secrets.MASTER_KEY }}
22+
HOOKKEY: ${{ secrets.HOOK_KEY }}
1723
- uses: codecov/codecov-action@v3
1824
- run: npm run build
1925
- if: github.ref_name == 'master'

test/test.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,11 @@ if (typeof require !== 'undefined') {
66
global.AV = require('../src/entry');
77
}
88

9-
// AV.init({
10-
// appId: 'Vpe1RqHgS5VGWBlhB6pdiiow-null',
11-
// appKey: 'OxKVgM0izOIckMi9WiT0pBSf',
12-
// masterKey: 'RCLNNJ6l51YJXzv7YG4fHA5v',
13-
// serverURLs: 'https://cn-stg1.leancloud.cn',
14-
// });
15-
169
AV.init({
17-
appId: process.env.APPID || '95TNUaOSUd8IpKNW0RSqSEOm-9Nh9j0Va',
18-
appKey: process.env.APPKEY || 'gNAE1iHowdQvV7cqpfCMGaGN',
19-
masterKey: process.env.MASTERKEY || 'ue9M9nqwD4MQNXD3oiN5rAOv',
20-
hookKey: process.env.HOOKKEY || '2iCbUZDgEF0siKxmCn2kVQXV',
21-
serverURLs: process.env.SERVER_URL || 'https://95tnuaos.lc-cn-e1-shared.com',
10+
appId: process.env.APPID,
11+
appKey: process.env.APPKEY,
12+
masterKey: process.env.MASTERKEY,
13+
hookKey: process.env.HOOKKEY,
14+
serverURLs: process.env.SERVER_URL,
2215
});
2316
AV.setProduction(true);

0 commit comments

Comments
 (0)