Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/npm to yarn main #41140

Merged
merged 8 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ references:
paths:
- '.git'

# npm cache
# yarn cache
#
# npm caches the modules it installs in ~/.npm.
# yarn caches the modules it installs in ~/.cache/yarn.
# We cache that cache to save time pulling modules from the network.
#
#
Expand All @@ -110,29 +110,29 @@ references:
# - https://github.com/Automattic/wp-calypso/pull/25487
# - https://github.com/Automattic/wp-calypso/pull/27180
#
# More about the CircleCI cache: https://circleci.com/docs/2.0/caching
restore-npm-cache: &restore-npm-cache
name: 'Restore npm cache'
# More about the CircleCI cache: https://circleci.com/docs/2.0/caching and https://circleci.com/docs/2.0/yarn/
restore-yarn-cache: &restore-yarn-cache
name: 'Restore yarn cache'
keys:
- v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v3-npm-modules-{{ checksum ".nvmrc" }}-{{ checksum "package-lock.json" }}
- v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v3-npm-modules-{{ checksum ".nvmrc" }}
- v{{ .Environment.GLOBAL_CACHE_PREFIX }}-yarn-modules-{{ checksum ".nvmrc" }}-{{ checksum "yarn.lock" }}
- v{{ .Environment.GLOBAL_CACHE_PREFIX }}-yarn-modules-{{ checksum ".nvmrc" }}

npm-install: &npm-install
yarn-install: &yarn-install
environment:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true"
name: Install npm dependencies
command: npm ci
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
name: Install dependencies
command: yarn install --frozen-lockfile

save-npm-cache: &save-npm-cache
name: 'Save node_modules cache'
key: v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v3-npm-modules-{{ checksum ".nvmrc" }}-{{ checksum "package-lock.json" }}
save-yarn-cache: &save-yarn-cache
name: 'Save yarn cache'
key: v{{ .Environment.GLOBAL_CACHE_PREFIX }}-yarn-modules-{{ checksum ".nvmrc" }}-{{ checksum "yarn.lock" }}
paths:
- ~/.npm
npm-e2e-install: &npm-e2e-install
name: Install e2e npm dependencies
- ~/.cache/yarn
yarn-e2e-install: &yarn-e2e-install
name: Install e2e yarn dependencies
command: |
cd test/e2e &&
CHROMEDRIVER_VERSION=$(<.chromedriver_version) npm ci
CHROMEDRIVER_VERSION=$(<.chromedriver_version) yarn install --frozen-lockfile
# Babel cache
# More about the CircleCI cache: https://circleci.com/docs/2.0/caching
Expand Down Expand Up @@ -196,11 +196,11 @@ jobs:
- run: *update-git-master
- save_cache: *save-git-cache
# npm dependencies
- restore_cache: *restore-npm-cache
- run: *npm-install
- run: *npm-e2e-install
- save_cache: *save-npm-cache
- run: npm run build-packages
- restore_cache: *restore-yarn-cache
- run: *yarn-install
- run: *yarn-e2e-install
- save_cache: *save-yarn-cache
- run: yarn run build-packages
- persist_to_workspace:
root: '~'
paths:
Expand All @@ -214,7 +214,7 @@ jobs:
- run:
name: TypeScript typecheck
# Report but don't fail the build (`|| exit 0`)
command: npm run typecheck || exit 0
command: yarn run typecheck || exit 0

typecheck-strict:
<<: *defaults
Expand All @@ -223,7 +223,7 @@ jobs:
- prepare
- run:
name: TypeScript strict typecheck of individual subprojects
command: npm run tsc -- --project client/landing/gutenboarding
command: yarn run tsc --project client/landing/gutenboarding

lint-and-translate:
<<: *defaults
Expand All @@ -233,7 +233,7 @@ jobs:
- run:
name: Lint Config Keys
when: always
command: npm run lint:config-defaults
command: yarn run lint:config-defaults
- run:
name: Lint Client and Server
when: always
Expand All @@ -256,7 +256,7 @@ jobs:
name: Build calypso-strings.pot
when: always
command: |
npm run translate
yarn run translate
mv calypso-strings.pot "$CIRCLE_ARTIFACTS/translate"
- run:
name: Build New Strings .pot
Expand Down Expand Up @@ -497,7 +497,7 @@ jobs:
steps:
- prepare
- run: *set-e2e-variables
- run: npm run decryptconfig
- run: yarn run decryptconfig
- run: ./scripts/randomize.sh specs
- run: ./scripts/run-wrapper.sh
- run: *move-e2e-artifacts
Expand Down Expand Up @@ -561,7 +561,7 @@ jobs:
}" << parameters.slack-webhook >>
circleci-agent step halt
fi
- run: npm run decryptconfig
- run: yarn run decryptconfig
- run:
name: Run Canary Tests
command: |
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode
.yarn
/assets/
/build/
/docs/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/full-site-editing-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
paths:
- 'apps/full-site-editing/full-site-editing-plugin/**'

name: Build Full Site Editing plugin
name: build-fse-plugin

jobs:
build:
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@master
- name: Install dependencies
run: npm ci
run: yarn install --frozen-lockfile
- name: Build FSE
run: npx lerna run build --scope='@automattic/full-site-editing' --stream
- name: Upload build artifact
Expand Down
94 changes: 47 additions & 47 deletions .github/workflows/icfy-stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,50 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '>=12.15.0'
- name: Checkout code
uses: actions/checkout@v2
- name: Fetch git history
run: git fetch --prune --unshallow
- name: Install dependencies
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
run: npm ci
- name: Capture npm logs
uses: actions/upload-artifact@v1
if: failure()
with:
name: npm-logs
path: /home/runner/.npm/_logs/
- name: Build ICFY stats
env:
NODE_ENV: production
BROWSERSLIST_ENV: defaults
WORKERS: 2
run: npm run analyze-icfy
- run: mkdir icfy-stats && mv client/{chart,stats}.json icfy-stats
- uses: actions/upload-artifact@v1
with:
name: icfy
path: icfy-stats
- name: Upload build artifact
env:
ICFY_SECRET: ${{ secrets.ICFY_SECRET }}
run: |
ANCESTOR_SHA1=$(git merge-base HEAD origin/master)
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
curl -X POST --globoff \
"http://api.iscalypsofastyet.com:5000/submit-stats?from=github&secret=$ICFY_SECRET" \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"payload": {
"branch": "'"$CURRENT_BRANCH"'",
"build_num": '"$GITHUB_RUN_ID"',
"sha": "'"$GITHUB_SHA"'",
"ancestor": "'"$ANCESTOR_SHA1"'"
}
}'
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '^12.13.1'
- name: Checkout code
uses: actions/checkout@v2
- name: Fetch git history
run: git fetch --prune --unshallow
- name: Install dependencies
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
run: yarn install
- name: Capture yarn logs
uses: actions/upload-artifact@v1
if: failure()
with:
name: yarn-logs
path: yarn-error.log
- name: Build ICFY stats
env:
NODE_ENV: production
BROWSERSLIST_ENV: defaults
WORKERS: 2
run: yarn run analyze-icfy
- run: mkdir icfy-stats && mv client/{chart,stats}.json icfy-stats
- uses: actions/upload-artifact@v1
with:
name: icfy
path: icfy-stats
- name: Upload build artifact
env:
ICFY_SECRET: ${{ secrets.ICFY_SECRET }}
run: |
ANCESTOR_SHA1=$(git merge-base HEAD origin/master)
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
curl -X POST --globoff \
"http://api.iscalypsofastyet.com:5000/submit-stats?from=github&secret=$ICFY_SECRET" \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"payload": {
"branch": "'"$CURRENT_BRANCH"'",
"build_num": '"$GITHUB_RUN_ID"',
"sha": "'"$GITHUB_SHA"'",
"ancestor": "'"$ANCESTOR_SHA1"'"
}
}'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ spec-xunit-reporter-0.0.1.tgz
*xunit_*.xml
lerna-debug.log
/vendor
yarn-error.log

# added during build
/config/secrets.json
Expand Down
Loading