Skip to content

Commit

Permalink
chore: use orb on ci rather than docker image (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Aug 26, 2020
1 parent 060467c commit 9af3423
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ workflows:
exclude:
- node-version: '6'
prom-client-version: '12'
orbs:
node: circleci/[email protected]
version: 2.1
jobs:
test:
Expand All @@ -17,31 +19,21 @@ jobs:
type: string
prom-client-version:
type: string
docker:
- image: node:<< parameters.node-version >>
executor: node/default
steps:
- checkout
- restore_cache:
keys:
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-lock-master-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-cache-master-{{ .Environment.CIRCLE_JOB }}
- run:
name: Install dependencies
command: yarn install --ignore-engines
- node/install:
node-version: << parameters.node-version >>
install-npm: false
install-yarn: true
- node/install-packages:
pkg-manager: yarn
override-ci-command: yarn install --ignore-engines
cache-path: ~/.cache/yarn
include-branch-in-cache-key: false
- run:
name: Install prom-client@<< parameters.prom-client-version >>
command: yarn add --dev prom-client@^<< parameters.prom-client-version >> --ignore-engines
- run:
name: Test prom-client@<< parameters.prom-client-version >>
command: yarn test
- save_cache:
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-lock-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
- save_cache:
key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-yarn-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
paths:
- /usr/local/share/.cache/yarn
- /root/.cache/yarn

0 comments on commit 9af3423

Please sign in to comment.