Skip to content

Commit a8f99e1

Browse files
VoloVolo
authored andcommitted
Fix pipeline
Fix pipeline Fix pipeline Fix pipeline Fix pipeline Fix pipeline Fix pipeline Fix pipeline Fix pipeline Fix pipeline
1 parent e378f7e commit a8f99e1

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.circleci/config.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ jobs:
1515
key: dependency-cache-{{ checksum "yarn.lock" }}
1616
paths:
1717
- node_modules
18+
- restore_cache:
19+
key: dist-cache-{{ .Environment.CIRCLE_SHA1 }}
1820
- run: yarn prepublish
21+
- save_cache:
22+
key: dist-cache-{{ .Environment.CIRCLE_SHA1 }}
23+
paths:
24+
- dist
1925
unit_test:
2026
docker:
2127
- image: circleci/node:14-browsers
@@ -29,11 +35,15 @@ jobs:
2935
docker:
3036
- image: circleci/node:14-browsers
3137
working_directory: ~/intercom-node
38+
environment:
39+
API_TOKEN: $API_TOKEN
3240
steps:
3341
- checkout
3442
- restore_cache:
3543
key: dependency-cache-{{ checksum "yarn.lock" }}
36-
- run: export $API_TOKEN
44+
- restore_cache:
45+
key: dist-cache-{{ .Environment.CIRCLE_SHA1 }}
46+
# - run: export $API_TOKEN
3747
- run: yarn test:integration
3848

3949
workflows:
@@ -46,7 +56,7 @@ workflows:
4656
- build
4757
- integration_test_approval:
4858
requires:
49-
- build
59+
- unit_test
5060
type: approval
5161
- integration_test:
5262
requires:

test/integration/utils/config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
const apiToken = process.env.API_TOKEN;
2-
3-
if (!apiToken) {
4-
throw new Error('API_TOKEN is required in env to run integration tests!');
5-
}
6-
7-
export const token = apiToken;
1+
export const token = process.env.API_TOKEN;

0 commit comments

Comments
 (0)