File tree Expand file tree Collapse file tree 3 files changed +43
-4
lines changed Expand file tree Collapse file tree 3 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 1+ version : 2.1
2+
3+ workflows :
4+ test :
5+ jobs :
6+ - build-run-linux :
7+ context : hello-world-demos
8+
9+ test-daily :
10+ triggers :
11+ - schedule :
12+ cron : " 0 6 * * *"
13+ filters :
14+ branches :
15+ only : main
16+ jobs :
17+ - build-run-linux :
18+ context : hello-world-demos
19+
20+ # This CI build ensures that the demo both compiles and works correctly. For the runtime test,
21+ # we use an SDK key and flag key that are passed in via the CircleCI project configuration;
22+ # the flag is configured to return a true value.
23+
24+ jobs :
25+ build-run-linux :
26+ docker :
27+ - image : circleci/node:latest
28+ steps :
29+ - checkout
30+ - run :
31+ name : insert SDK key and flag key into demo code
32+ command : |
33+ sed -i.bak "s/sdkKey *= *\".*\"/sdkKey = \"${LD_HELLO_WORLD_SDK_KEY}\"/" index.ts
34+ sed -i.bak "s/featureFlagKey *= *\".*\"/featureFlagKey = \"${LD_HELLO_WORLD_FLAG_KEY_WITH_TRUE_VALUE}\"/" index.ts
35+ - run : npm install
36+ - run :
37+ name : run demo
38+ command : |
39+ npm start | tee output.txt
40+ grep "is true for this user" output.txt || (echo "Flag did not evaluate to expected true value" && exit 1)
Original file line number Diff line number Diff line change 1- node_modules
1+ node_modules
2+ package-lock.json
Original file line number Diff line number Diff line change 44 "description" : " Hello LaunchDarkly for Node.js with TypeScript" ,
55 "main" : " index.ts" ,
66 "scripts" : {
7- "start" : " npm run build:live" ,
8- "build:live" : " nodemon --exec ./node_modules/.bin/ts-node -- ./index.ts"
7+ "start" : " ts-node ./index.ts"
98 },
109 "author" : " LaunchDarkly <team@launchdarkly.com>" ,
1110 "license" : " Apache-2.0" ,
1211 "devDependencies" : {
1312 "@types/node" : " 8.0.4" ,
14- "nodemon" : " 1.11.0" ,
1513 "ts-node" : " 3.1.0" ,
1614 "typescript" : " 2.4.1"
1715 },
You can’t perform that action at this time.
0 commit comments