Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dima Krasner
Sharkey
Commits
97385db5
Unverified
Commit
97385db5
authored
6 years ago
by
Acid Chicken (硫酸鶏)
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use yarn instead of npm on CircleCI
parent
c69d57a0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.circleci/config.yml
+13
-17
13 additions, 17 deletions
.circleci/config.yml
with
13 additions
and
17 deletions
.circleci/config.yml
+
13
−
17
View file @
97385db5
...
...
@@ -29,18 +29,14 @@ jobs:
executor
:
default
steps
:
-
checkout
-
run
:
name
:
Ensure package-lock.json
command
:
|
[ ! -e package-lock.json ] && echo '{}' > package-lock.json
-
restore_cache
:
name
:
Restore npm package caches
keys
:
-
npm
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "
package-lock.json
" }}
-
-
npm
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-
-
npm
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-
-
npm
-v1-arch-{{ arch }}-
-
npm
-v1-
-
yarn
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "
yarn.lock
" }}
-
yarn
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-
-
yarn
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-
-
yarn
-v1-arch-{{ arch }}-
-
yarn
-v1-
-
run
:
name
:
Install Dependencies
command
:
|
...
...
@@ -54,13 +50,13 @@ jobs:
-
run
:
name
:
Build
command
:
|
node-gyp configure
node-gyp build
npm run build || (echo -e '\033[0;34mRebuild modules\033[0;39m' && ls -1A node_modules | grep '^[^@]' | xargs npm rebuild && ls -1A node_modules | grep '^@' | xargs -I%1 sh -c 'ls -1A node_modules/'%1' | xargs -P0 -I%2 npm rebuild node_modules/'%1'/%2' && npm ru
n build
)
ls -1ARl node_modules > ls
yarn install
yarn autoclean
yar
n build
[ ! -e yarn.lock ] && touch yarn.lock
-
save_cache
:
name
:
Cache npm packages
key
:
npm
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "
package-lock.json" }}-ls-{{ checksum "ls
" }}
key
:
yarn
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "
yarn.lock
" }}
paths
:
-
node_modules
# - store_artifacts:
...
...
@@ -90,11 +86,11 @@ jobs:
-
run
:
name
:
Test
command
:
|
npm ru
n test
ls -1ARl node_modules > ls
yar
n test
[ ! -e yarn.lock ] && touch yarn.lock
-
save_cache
:
name
:
Cache npm packages
key
:
npm
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "
package-lock.json" }}-ls-{{ checksum "ls
" }}
key
:
yarn
-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "
yarn.lock
" }}
paths
:
-
node_modules
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment