Skip to content

Commit 318d405

Browse files
Merge pull request #30 from cclauss/patch-2
CircleCI: Use orbs: node: circleci/node@7.1.0
2 parents 4b4e424 + ba45854 commit 318d405

File tree

1 file changed

+22
-33
lines changed

1 file changed

+22
-33
lines changed

.circleci/config.yml

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,30 @@
1-
version: 2
1+
2+
# https://circleci.com/docs/language-javascript
3+
# https://circleci.com/developer/orbs/orb/circleci/node
4+
5+
version: 2.1
6+
orbs:
7+
node: circleci/node@7.1.0
8+
29
jobs:
3-
build:
4-
working_directory: ~/repo
5-
docker:
6-
- image: circleci/node:10
10+
build_and_test:
11+
executor: node/default
712
steps:
813
- checkout
9-
- restore_cache:
10-
key: dependency-cache-{{ checksum "package.json" }}
14+
- node/install-packages:
15+
pkg-manager: yarn
1116
- run:
12-
name: install
13-
command: yarn install
14-
- save_cache:
15-
key: dependency-cache-{{ checksum "package.json" }}
16-
paths:
17-
- ./node_modules
18-
- run:
19-
name: lint
20-
command: yarn lint
21-
- run:
22-
name: test
2317
command: yarn test
24-
- store_artifacts:
25-
path: test-results.xml
26-
prefix: tests
18+
- run:
19+
command: yarn build
2720
- store_test_results:
28-
path: test-results.xml
29-
- deploy:
30-
name: Maybe Deploy
31-
command: |
32-
if [ "${CIRCLE_BRANCH}" == "master" ]; then
33-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
34-
npm run 2npm
35-
fi
21+
path: test-results
22+
- persist_to_workspace:
23+
root: ~/project
24+
paths:
25+
- .
26+
3627
workflows:
37-
version: 2
38-
build:
28+
test_my_app:
3929
jobs:
40-
- build:
41-
context: org-global
30+
- build_and_test

0 commit comments

Comments
 (0)