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

chore(deps-dev): update to node 16 #5343

Merged
merged 14 commits into from
Apr 29, 2022
37 changes: 34 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
# Keep this in sync with /pipeline/install-node-prerequisites.yaml
NODE_VERSION: 14.19.0
NODE_VERSION: 16.14.2

jobs:
build:
Expand Down Expand Up @@ -57,8 +57,14 @@ jobs:
timeout-minutes: 5

unit-tests:
name: unit-tests (${{ matrix.shard-index }}/${{ strategy.job-total }})
runs-on: ubuntu-20.04
env: { PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 }
strategy:
fail-fast: false
matrix:
shard-index: [1, 2]

steps:
- uses: actions/checkout@v2
timeout-minutes: 2
Expand Down Expand Up @@ -86,19 +92,44 @@ jobs:
- run: yarn install --frozen-lockfile --prefer-offline
timeout-minutes: 10

- run: yarn test --ci
- run: yarn test --ci --shard=${{ matrix.shard-index }}/${{ strategy.job-total }}
timeout-minutes: 10

- name: upload artifact unit-tests-results
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: unit-tests-results
name: unit-tests-${{ matrix.shard-index }}-results
path: |
test-results/unit/junit.xml
test-results/unit/coverage/cobertura-coverage.xml
timeout-minutes: 5

publish-code-coverage:
needs: unit-tests # This waits for *all* of the unit-tests jobs
runs-on: ubuntu-20.04
steps:
# This only needs to be present so codecov can use the source tree for some post-processing
# This job doesn't require that we install dependencies
- uses: actions/checkout@v2
timeout-minutes: 2

- uses: actions/setup-node@v2
with: { node-version: "${{ env.NODE_VERSION }}" }
timeout-minutes: 2

- uses: actions/download-artifact@v3
with:
name: unit-tests-1-results
path: unit-tests-1-results
timeout-minutes: 2

- uses: actions/download-artifact@v3
with:
name: unit-tests-2-results
path: unit-tests-2-results
timeout-minutes: 2

- run: yarn publish-code-coverage
timeout-minutes: 3

Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ FROM mcr.microsoft.com/playwright:v1.21.1-focal AS setup
USER root

# We need to update certificates before we can successfully update and install node
# This is a workaround for https://github.com/nodesource/distributions/issues/1266
# Downgrading from nodejs 16.3.0 to 14.* is both for consistency with our other build
# environments and a workaround for https://github.com/nodejs/node/issues/39019
# This is a workaround for https://github.com/nodesource/distributions/issues/1266
#
# We pin nodejs 16.x instead of accepting Playwright's default for consistency with
# our other build environments.
RUN apt-get update ; apt-get install ca-certificates \
&& apt-get update \
&& apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get install -y --allow-downgrades nodejs=14.* && \
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y --allow-downgrades nodejs=16.* && \
rm -rf /var/lib/apt/lists/*

RUN npm install -g [email protected]
Expand Down
2 changes: 1 addition & 1 deletion docs/building-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This document describes how to build and test Accessibility Insights for Web (th

You will need the following tools installed:

- [Node](https://nodejs.org) >= 14.19.0 (check by running `node --version`) - This is the version being enforced on our builds
- [Node](https://nodejs.org) >= 16.14.2 (check by running `node --version`) - This is the version being enforced on our builds
- [Yarn](https://yarnpkg.com/getting-started/install) >= 1.22.10 (check by running `yarn --version`)
- Note: There is a [known name collision](https://github.com/yarnpkg/yarn/issues/673) between Yarn package manager and Hadoop YARN. If you have Hadoop YARN installed, replace `yarn` with `yarnpkg` in the commands below.
- **macOS only** [Xcode](https://wilsonmar.github.io/xcode/#XcodeInstall). This is needed when installing certain dependencies with native compilation steps. After installing Xcode, run the following commands from a command terminal:
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@
"start:unified": "electron drop/electron/unified-dev/product/bundle/main.bundle.js",
"start:unified:dev": "cross-env DEV_MODE=true yarnpkg start:unified",
"start:unified:mock-adb": "cross-env ANDROID_HOME=drop/mock-adb yarnpkg start:unified",
"test": "cross-env NODE_OPTIONS='--unhandled-rejections=strict' --max-old-space-size=16384 jest --projects src/tests/unit",
"test": "cross-env NODE_OPTIONS='--unhandled-rejections=strict' jest --projects src/tests/unit",
"publish-code-coverage": "npx codecov",
"test:e2e": "cross-env NODE_OPTIONS='--unhandled-rejections=strict' --max-old-space-size=16384 jest --projects src/tests/end-to-end --runInBand --forceExit --detectOpenHandles",
"test:e2e": "cross-env NODE_OPTIONS='--unhandled-rejections=strict' jest --projects src/tests/end-to-end --runInBand --forceExit --detectOpenHandles",
"test:e2e:docker:build": "docker build -t accessibility-insights-e2e --target web .",
"test:e2e:docker:build:web": "docker build -t accessibility-insights-web-e2e --target web .",
"test:e2e:docker:build:unified": "docker build -t accessibility-insights-unified-e2e --target unified .",
"test:e2e:docker:run": "docker run -t accessibility-insights-e2e",
"test:e2e:docker:run:web": "docker run -t accessibility-insights-web-e2e",
"test:e2e:docker:run:unified": "docker run -t accessibility-insights-unified-e2e sh -c \"yarn test:unified --ci\"",
"test:e2e:docker": "npm-run-all --serial test:e2e:docker:build \"test:e2e:docker:run {@}\" --",
"test:unified": "cross-env NODE_OPTIONS='--unhandled-rejections=strict' --max-old-space-size=16384 jest --projects src/tests/electron --runInBand --forceExit --detectOpenHandles",
"test:unified": "cross-env NODE_OPTIONS='--unhandled-rejections=strict' jest --projects src/tests/electron --runInBand --forceExit --detectOpenHandles",
"test:report:e2e": "lerna --scope accessibility-insights-report-e2e-tests run test",
"unified-mac-sign": "node ./pipeline/scripts/unified-mac-sign.js",
"watch": "npm-run-all --parallel --race --print-label watch:scss watch:grunt watch:test watch:webpack-dev-browser watch:webpack-unified",
Expand All @@ -104,7 +104,7 @@
"@types/jsdom": "^16.2.14",
"@types/lodash": "^4.14.182",
"@types/luxon": "^2.3.1",
"@types/node": "^14.18.16",
"@types/node": "^16.11.7",
"@types/react": "^16.14.25",
"@types/react-copy-to-clipboard": "^5.0.2",
"@types/react-dom": "^16.9.15",
Expand Down Expand Up @@ -202,7 +202,7 @@
"webextension-polyfill": "^0.9.0"
},
"resolutions": {
"@types/node": "^14.14.6",
"@types/node": "^16.11.7",
"ansi-regex": "^5.0.1",
"dot-prop": "^5.2.0",
"kind-of": "^6.0.3",
Expand Down
4 changes: 2 additions & 2 deletions pipeline/install-node-prerequisites.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ steps:
- task: NodeTool@0
inputs:
# Keep this in sync with /.github/workflows/ci.yml
versionSpec: '14.19.0'
displayName: use node 14.19.0
versionSpec: '16.14.2'
displayName: use node 16.14.2
timeoutInMinutes: 2

- script: npm install [email protected] -g
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2667,10 +2667,10 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==

"@types/node@*", "@types/[email protected]", "@types/node@^14.14.6", "@types/node@^14.18.16", "@types/node@^14.6.2":
version "14.18.16"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.16.tgz#878f670ba3f00482bf859b6550b6010610fc54b5"
integrity sha512-X3bUMdK/VmvrWdoTkz+VCn6nwKwrKCFTHtqwBIaQJNx4RUIBBUFXM00bqPz/DsDd+Icjmzm6/tyYZzeGVqb6/Q==
"@types/node@*", "@types/[email protected]", "@types/node@^14.6.2", "@types/node@^16.11.7":
version "16.11.26"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.26.tgz#63d204d136c9916fb4dcd1b50f9740fe86884e47"
integrity sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==

"@types/normalize-package-data@^2.4.0":
version "2.4.1"
Expand Down