Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 593eebd

Browse files
committed
use Circle node orb
1 parent 29e0c36 commit 593eebd

File tree

1 file changed

+13
-79
lines changed

1 file changed

+13
-79
lines changed

circle.yml

Lines changed: 13 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,16 @@
1-
version: 2
1+
# https://circleci.com/orbs/registry/orb/circleci/node
22
jobs:
33
build:
4-
working_directory: ~/cypress-io/cypress-browserify-preprocessor
5-
parallelism: 1
6-
shell: /bin/bash --login
7-
# CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did.
8-
# If any of these refer to each other, rewrite them so that they don't or see https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables .
9-
environment:
10-
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
11-
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
12-
# In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages.
13-
# In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images.
14-
# The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job.
15-
# We have selected a pre-built image that mirrors the build environment we use on
16-
# the 1.0 platform, but we recommend you choose an image more tailored to the needs
17-
# of each job. For more information on choosing an image (or alternatively using a
18-
# VM instead of a container) see https://circleci.com/docs/2.0/executor-types/
19-
# To see the list of pre-built images that CircleCI provides for most common languages see
20-
# https://circleci.com/docs/2.0/circleci-images/
21-
docker:
22-
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
23-
command: /sbin/init
4+
executor:
5+
name: node/default
6+
tag: '12'
247
steps:
25-
# Machine Setup
26-
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
27-
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
28-
- checkout
29-
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
30-
# In many cases you can simplify this from what is generated here.
31-
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
32-
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
33-
# This is based on your 1.0 configuration file or project settings
34-
- run:
35-
working_directory: ~/cypress-io/cypress-browserify-preprocessor
36-
command: nvm install 8 && nvm alias default 8
37-
# Dependencies
38-
# This would typically go in either a build or a build-and-test job when using workflows
39-
# Restore the dependency cache
40-
- restore_cache:
41-
keys:
42-
# This branch if available
43-
- v1-dep-{{ .Branch }}-
44-
# Default branch if not
45-
- v1-dep-master-
46-
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
47-
- v1-dep-
48-
# The following line was run implicitly in your 1.0 builds based on what CircleCI inferred about the structure of your project. In 2.0 you need to be explicit about which commands should be run. In some cases you can discard inferred commands if they are not relevant to your project.
49-
- run: if [ -z "${NODE_ENV:-}" ]; then export NODE_ENV=test; fi
50-
- run: export PATH="~/cypress-io/cypress-browserify-preprocessor/node_modules/.bin:$PATH"
51-
- run: npm install
52-
# Save dependency cache
53-
- save_cache:
54-
key: v1-dep-{{ .Branch }}-{{ epoch }}
55-
paths:
56-
# This is a broad list of cache paths to include many possible development environments
57-
# You can probably delete some of these entries
58-
- vendor/bundle
59-
- ~/virtualenvs
60-
- ~/.m2
61-
- ~/.ivy2
62-
- ~/.bundle
63-
- ~/.go_workspace
64-
- ~/.gradle
65-
- ~/.cache/bower
66-
- ./node_modules
67-
# Test
68-
# This would typically be a build job when using workflows, possibly combined with build
69-
# This is based on your 1.0 configuration file or project settings
70-
- run: npm test
71-
# This is based on your 1.0 configuration file or project settings
72-
- run: npm run semantic-release || true
73-
# Teardown
74-
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
75-
# Save test results
76-
- store_test_results:
77-
path: /tmp/circleci-test-results
78-
# Save artifacts
79-
- store_artifacts:
80-
path: /tmp/circleci-artifacts
81-
- store_artifacts:
82-
path: /tmp/circleci-test-results
8+
- checkout
9+
- node/with-cache:
10+
steps:
11+
- run: npm ci
12+
- run: npm run test
13+
- run: npm run semantic-release || true
14+
orbs:
15+
node: circleci/node@1.1
16+
version: 2.1

0 commit comments

Comments
 (0)