Skip to content

Commit

Permalink
Merge pull request #30 from cclauss/patch-2
Browse files Browse the repository at this point in the history
CircleCI: Use orbs: node: circleci/node@7.1.0
  • Loading branch information
pieterbrandsen authored Feb 22, 2025
2 parents 4b4e424 + ba45854 commit 318d405
Showing 1 changed file with 22 additions and 33 deletions.
55 changes: 22 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
version: 2

# https://circleci.com/docs/language-javascript
# https://circleci.com/developer/orbs/orb/circleci/node

version: 2.1
orbs:
node: circleci/node@7.1.0

jobs:
build:
working_directory: ~/repo
docker:
- image: circleci/node:10
build_and_test:
executor: node/default
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- node/install-packages:
pkg-manager: yarn
- run:
name: install
command: yarn install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run:
name: lint
command: yarn lint
- run:
name: test
command: yarn test
- store_artifacts:
path: test-results.xml
prefix: tests
- run:
command: yarn build
- store_test_results:
path: test-results.xml
- deploy:
name: Maybe Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm run 2npm
fi
path: test-results
- persist_to_workspace:
root: ~/project
paths:
- .

workflows:
version: 2
build:
test_my_app:
jobs:
- build:
context: org-global
- build_and_test

0 comments on commit 318d405

Please sign in to comment.