feat(repo): re-enable e2e tests on Windows
This commit is contained in:
parent
d55d6f88e5
commit
eff20a64be
@ -2,6 +2,17 @@ version: 2.1
|
|||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
var_1: &working_directory ~/repo
|
var_1: &working_directory ~/repo
|
||||||
|
var_2:
|
||||||
|
&nx_cli [
|
||||||
|
'e2e-workspace',
|
||||||
|
'e2e-cli,e2e-nx-plugin,dep-graph-client-e2e',
|
||||||
|
'e2e-cypress,e2e-jest',
|
||||||
|
'e2e-react',
|
||||||
|
'e2e-next',
|
||||||
|
'e2e-node',
|
||||||
|
'e2e-web,e2e-linter,e2e-storybook',
|
||||||
|
]
|
||||||
|
var_3: &ng_cli ['e2e-angular']
|
||||||
|
|
||||||
executors:
|
executors:
|
||||||
linux:
|
linux:
|
||||||
@ -9,6 +20,13 @@ executors:
|
|||||||
docker:
|
docker:
|
||||||
- image: cimg/node:12.20-browsers
|
- image: cimg/node:12.20-browsers
|
||||||
|
|
||||||
|
windows:
|
||||||
|
working_directory: *working_directory
|
||||||
|
resource_class: windows.medium
|
||||||
|
machine:
|
||||||
|
image: windows-server-2019-vs2019:stable
|
||||||
|
shell: cmd.exe
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
setup:
|
setup:
|
||||||
parameters:
|
parameters:
|
||||||
@ -29,11 +47,21 @@ commands:
|
|||||||
key: nrwl-nx-yarn-packages-<< parameters.os >>-{{ checksum "yarn.lock" }}
|
key: nrwl-nx-yarn-packages-<< parameters.os >>-{{ checksum "yarn.lock" }}
|
||||||
paths:
|
paths:
|
||||||
- ~/.cache/yarn
|
- ~/.cache/yarn
|
||||||
- run:
|
|
||||||
name: Install PNPM
|
- when:
|
||||||
command: |
|
condition:
|
||||||
npm install --prefix=$HOME/.local -g pnpm
|
equal: [<< parameters.os >>, linux]
|
||||||
pnpm --version
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Install PNPM
|
||||||
|
command: npm install --prefix=$HOME/.local -g pnpm
|
||||||
|
- when:
|
||||||
|
condition:
|
||||||
|
equal: [<< parameters.os >>, windows]
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Install PNPM
|
||||||
|
command: npm install -g pnpm
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
checks-and-unit-tests:
|
checks-and-unit-tests:
|
||||||
@ -75,6 +103,9 @@ jobs:
|
|||||||
cli:
|
cli:
|
||||||
type: string
|
type: string
|
||||||
default: ''
|
default: ''
|
||||||
|
pm:
|
||||||
|
type: string
|
||||||
|
default: pnpm
|
||||||
executor: << parameters.os >>
|
executor: << parameters.os >>
|
||||||
steps:
|
steps:
|
||||||
- setup:
|
- setup:
|
||||||
@ -84,7 +115,8 @@ jobs:
|
|||||||
command: yarn e2e << parameters.packages >> affected
|
command: yarn e2e << parameters.packages >> affected
|
||||||
no_output_timeout: 30m
|
no_output_timeout: 30m
|
||||||
environment:
|
environment:
|
||||||
SELECTED_PM: pnpm
|
NX_E2E_CI_CACHE_KEY: e2e-circleci-<< parameters.os >>-<< parameters.pm >>
|
||||||
|
SELECTED_PM: << parameters.pm >>
|
||||||
SELECTED_CLI: << parameters.cli >>
|
SELECTED_CLI: << parameters.cli >>
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
@ -95,19 +127,31 @@ workflows:
|
|||||||
matrix:
|
matrix:
|
||||||
parameters:
|
parameters:
|
||||||
os: ['linux']
|
os: ['linux']
|
||||||
packages:
|
packages: *nx_cli
|
||||||
[
|
|
||||||
'e2e-workspace',
|
|
||||||
'e2e-cli,e2e-nx-plugin,dep-graph-client-e2e',
|
|
||||||
'e2e-cypress,e2e-jest',
|
|
||||||
'e2e-react',
|
|
||||||
'e2e-next',
|
|
||||||
'e2e-node',
|
|
||||||
'e2e-web,e2e-linter,e2e-storybook',
|
|
||||||
]
|
|
||||||
- e2e:
|
- e2e:
|
||||||
matrix:
|
matrix:
|
||||||
parameters:
|
parameters:
|
||||||
os: ['linux']
|
os: ['linux']
|
||||||
packages: ['e2e-angular']
|
packages: *ng_cli
|
||||||
|
cli: 'angular'
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
triggers:
|
||||||
|
- schedule:
|
||||||
|
cron: '0 0 * * *'
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
- e2e:
|
||||||
|
matrix:
|
||||||
|
parameters:
|
||||||
|
os: ['windows']
|
||||||
|
packages: *nx_cli
|
||||||
|
- e2e:
|
||||||
|
matrix:
|
||||||
|
parameters:
|
||||||
|
os: ['windows']
|
||||||
|
packages: *ng_cli
|
||||||
cli: 'angular'
|
cli: 'angular'
|
||||||
|
|||||||
1
.github/workflows/e2e-matrix.yml
vendored
1
.github/workflows/e2e-matrix.yml
vendored
@ -49,6 +49,7 @@ jobs:
|
|||||||
- name: Run e2e tests
|
- name: Run e2e tests
|
||||||
run: yarn e2e ${{ matrix.packages }} affected
|
run: yarn e2e ${{ matrix.packages }} affected
|
||||||
env:
|
env:
|
||||||
|
NX_E2E_CI_CACHE_KEY: e2e-gha-${{ matrix.node_version }}-${{ matrix.package_manager }}
|
||||||
NODE_OPTIONS: --max_old_space_size=8192
|
NODE_OPTIONS: --max_old_space_size=8192
|
||||||
SELECTED_PM: ${{ matrix.package_manager }}
|
SELECTED_PM: ${{ matrix.package_manager }}
|
||||||
SELECTED_CLI: ${{ matrix.packages == 'e2e-angular' && 'angular' || 'nx' }}
|
SELECTED_CLI: ${{ matrix.packages == 'e2e-angular' && 'angular' || 'nx' }}
|
||||||
|
|||||||
5
nx.json
5
nx.json
@ -19,7 +19,10 @@
|
|||||||
"cacheableOperations": ["build", "build-base", "test", "lint", "e2e"],
|
"cacheableOperations": ["build", "build-base", "test", "lint", "e2e"],
|
||||||
"canTrackAnalytics": false,
|
"canTrackAnalytics": false,
|
||||||
"showUsageWarnings": true,
|
"showUsageWarnings": true,
|
||||||
"runtimeCacheInputs": ["echo $SELECTED_CLI"],
|
"runtimeCacheInputs": [
|
||||||
|
"echo $SELECTED_CLI",
|
||||||
|
"echo $NX_E2E_CI_CACHE_KEY"
|
||||||
|
],
|
||||||
"cacheDirectory": "/tmp/nx-cache"
|
"cacheDirectory": "/tmp/nx-cache"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user