Better configuration of CircleCI (#3908)

This commit is contained in:
Acid Chicken (硫酸鶏) 2019-01-17 21:15:37 +09:00 committed by GitHub
parent 5d75746681
commit 27ceae7406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,8 @@ jobs:
- run: - run:
name: Build name: Build
command: | 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 run 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 run build)
ls -1ARl node_modules > ls ls -1ARl node_modules > ls
- save_cache: - save_cache:
@ -88,7 +90,7 @@ jobs:
- run: - run:
name: Test name: Test
command: | command: |
npm run test || (npm rebuild && npm run test) || ((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 run build)) && npm run test) npm run test
ls -1ARl node_modules > ls ls -1ARl node_modules > ls
- save_cache: - save_cache:
name: Cache npm packages name: Cache npm packages