Skip to content

Commit

Permalink
feat(repo): add nightly tests for several node versions (#15908)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Mar 28, 2023
1 parent 15f6714 commit ae3a55f
Show file tree
Hide file tree
Showing 2 changed files with 251 additions and 25 deletions.
147 changes: 135 additions & 12 deletions .github/workflows/e2e-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,34 @@ jobs:
os:
- ubuntu-latest
- macos-latest
node_version:
- 19
- 18
- 16
exclude:
# run just node v18 on macos
- os: macos-latest
node_version: 19
- os: macos-latest
node_version: 16

name: Cache install (${{ matrix.os }}, node v${{ matrix.node_version }})
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: ${{ matrix.node_version }}

- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
with:
lookup-only: true
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}

- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
Expand All @@ -51,7 +64,9 @@ jobs:
- ubuntu-latest
- macos-latest
node_version:
- '16'
- 19
- 18
- 16
package_manager:
- npm
- yarn
Expand Down Expand Up @@ -85,7 +100,7 @@ jobs:
- e2e-vite
- e2e-webpack
- e2e-workspace-create
- e2e-e2e-workspace-create-npm
- e2e-workspace-create-npm
include:
# os short names
- os: ubuntu-latest
Expand Down Expand Up @@ -149,7 +164,7 @@ jobs:
codeowners: 'S04SJ6PL98X'
- project: e2e-workspace-create
codeowners: 'S04SYHYKGNP'
- project: e2e-e2e-workspace-create-npm
- project: e2e-workspace-create-npm
codeowners: 'S04SYHYKGNP'
exclude:
# exclude react-native tests from ubuntu
Expand All @@ -159,14 +174,123 @@ jobs:
project: e2e-detox
- os: ubuntu-latest
project: e2e-expo
# run just npm v16 on macos
# exclude non-CNW/Lerna tests from non-LTS node versions
- node_version: 16
project: e2e-add-nx-to-monorepo
- node_version: 16
project: e2e-angular-core
- node_version: 16
project: e2e-angular-extensions
- node_version: 16
project: e2e-cra-to-nx
- node_version: 16
project: e2e-cypress
- node_version: 16
project: e2e-detox
- node_version: 16
project: e2e-esbuild
- node_version: 16
project: e2e-expo
- node_version: 16
project: e2e-jest
- node_version: 16
project: e2e-js
- node_version: 16
project: e2e-linter
- node_version: 16
project: e2e-make-angular-cli-faster
- node_version: 16
project: e2e-next
- node_version: 16
project: e2e-node
- node_version: 16
project: e2e-nx-init
- node_version: 16
project: e2e-nx-misc
- node_version: 16
project: e2e-nx-plugin
- node_version: 16
project: e2e-lerna-smoke-tests
- node_version: 16
project: e2e-react
- node_version: 16
project: e2e-react-native
- node_version: 16
project: e2e-web
- node_version: 16
project: e2e-rollup
- node_version: 16
project: e2e-storybook
- node_version: 16
project: e2e-storybook-angular
- node_version: 16
project: e2e-vite
- node_version: 16
project: e2e-webpack
- node_version: 19
project: e2e-add-nx-to-monorepo
- node_version: 19
project: e2e-angular-core
- node_version: 19
project: e2e-angular-extensions
- node_version: 19
project: e2e-cra-to-nx
- node_version: 19
project: e2e-cypress
- node_version: 19
project: e2e-detox
- node_version: 19
project: e2e-esbuild
- node_version: 19
project: e2e-expo
- node_version: 19
project: e2e-jest
- node_version: 19
project: e2e-js
- node_version: 19
project: e2e-linter
- node_version: 19
project: e2e-make-angular-cli-faster
- node_version: 19
project: e2e-next
- node_version: 19
project: e2e-node
- node_version: 19
project: e2e-nx-init
- node_version: 19
project: e2e-nx-misc
- node_version: 19
project: e2e-nx-plugin
- node_version: 19
project: e2e-lerna-smoke-tests
- node_version: 19
project: e2e-react
- node_version: 19
project: e2e-react-native
- node_version: 19
project: e2e-web
- node_version: 19
project: e2e-rollup
- node_version: 19
project: e2e-storybook
- node_version: 19
project: e2e-storybook-angular
- node_version: 19
project: e2e-vite
- node_version: 19
project: e2e-webpack
# run just npm v18 on macos
- os: macos-latest
package_manager: yarn
- os: macos-latest
package_manager: pnpm
- os: macos-latest
node_version: 16
- os: macos-latest
node_version: 19
fail-fast: false

name: ${{ matrix.os_name }}/${{ matrix.package_manager }} ${{ join(matrix.project) }}
name: ${{ matrix.os_name }}/${{ matrix.package_manager }}/${{ matrix.node_version }} ${{ join(matrix.project) }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -191,7 +315,7 @@ jobs:
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}

- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -318,13 +442,12 @@ jobs:
// message
let lastProject;
let result = `
**Node** v16
\`\`\`
| Failed project | PM | OS |
|--------------------------------|------|-------|`;
| Failed project | PM | OS | Node |
|--------------------------------|------|-------|------|`;
failedProjects.forEach(matrix => {
const project = matrix.project !== lastProject ? matrix.project : '...';
result += `\n| ${project.padEnd(30)} | ${matrix.package_manager.padEnd(4)} | ${matrix.os_name} |`
result += `\n| ${project.padEnd(30)} | ${matrix.package_manager.padEnd(4)} | ${matrix.os_name} | v${matrix.node_version.pad(3)} |`
lastProject = matrix.project;
});
result += `\`\`\``;
Expand Down
Loading

0 comments on commit ae3a55f

Please sign in to comment.