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

Trying out yarn #39121

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2fbb3f4
drop the npm lockfile
blowery Jan 29, 2020
759a3d4
Link missing packages in the monorepo
scinos Mar 5, 2020
d680925
Clean up package.json files
scinos Mar 5, 2020
e98cbd3
Delete debug file
scinos Mar 5, 2020
a5c884a
Adds vfile-message 2 as a root dependency to stop vfile-message 1.x b…
scinos Mar 10, 2020
e4e556b
Fix typos in npm scripts
scinos Mar 10, 2020
aeefbab
Fix typo in circleci config
scinos Mar 11, 2020
7d0324f
Bump @automattic/calypso-analytics to 1.0.0-alpha.1
scinos Mar 11, 2020
3bb3ff8
Update @automattic/full-site-editing to 0.23.0
scinos Mar 11, 2020
7535e80
Update yarn.lock
scinos Mar 11, 2020
4eec730
Adds missing 'cookie' dependency in '@automattic/calypso-analytics'
scinos Mar 11, 2020
8441200
Migrate ICFY action to use yarn
scinos Mar 11, 2020
6ca1378
Use a valid node version
scinos Mar 11, 2020
77149a8
Clean up merge errors
scinos Mar 17, 2020
6438052
Force hoisting of vfile-message^2.0.0 to prevent vfile-message@1.1.1 …
scinos Mar 17, 2020
0a62374
Update yarn.lock
scinos Mar 17, 2020
925a4d1
Update yarn.lock
scinos Mar 19, 2020
b2d652b
Uses yarn's set-polivy to fix the veresion to 1.22.4
scinos Mar 20, 2020
c4cda6b
Move devDependencies to dependencies
scinos Mar 20, 2020
6f40d6c
Add documentationa about yarn
scinos Mar 20, 2020
673880f
Use the correct binary for package.json linting
scinos Mar 20, 2020
23620bb
Update yarn.lock
scinos Apr 7, 2020
36adcf8
Check that npm scripts are run via `yarn`
scinos Apr 7, 2020
1f63eaa
Trigger CI
scinos Apr 8, 2020
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
66 changes: 33 additions & 33 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
blowery marked this conversation as resolved.
Show resolved Hide resolved

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 Expand Up @@ -624,10 +624,10 @@ workflows:
- master
# Do not spin up calypso.live for fork pull requests. Calypso.live will not build them.
- /pull\/[0-9]+/
# - test-e2e-canary:
# requires:
# - wait-calypso-live
# test-flags: '-C -S $CIRCLE_SHA1'
# - test-e2e-canary:
# requires:
# - wait-calypso-live
# test-flags: '-C -S $CIRCLE_SHA1'
- test-e2e-canary:
name: test-e2e-canary-ie
requires:
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