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
|
||||
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:
|
||||
linux:
|
||||
@ -9,6 +20,13 @@ executors:
|
||||
docker:
|
||||
- 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:
|
||||
setup:
|
||||
parameters:
|
||||
@ -29,11 +47,21 @@ commands:
|
||||
key: nrwl-nx-yarn-packages-<< parameters.os >>-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- ~/.cache/yarn
|
||||
- run:
|
||||
name: Install PNPM
|
||||
command: |
|
||||
npm install --prefix=$HOME/.local -g pnpm
|
||||
pnpm --version
|
||||
|
||||
- when:
|
||||
condition:
|
||||
equal: [<< parameters.os >>, linux]
|
||||
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:
|
||||
checks-and-unit-tests:
|
||||
@ -75,6 +103,9 @@ jobs:
|
||||
cli:
|
||||
type: string
|
||||
default: ''
|
||||
pm:
|
||||
type: string
|
||||
default: pnpm
|
||||
executor: << parameters.os >>
|
||||
steps:
|
||||
- setup:
|
||||
@ -84,7 +115,8 @@ jobs:
|
||||
command: yarn e2e << parameters.packages >> affected
|
||||
no_output_timeout: 30m
|
||||
environment:
|
||||
SELECTED_PM: pnpm
|
||||
NX_E2E_CI_CACHE_KEY: e2e-circleci-<< parameters.os >>-<< parameters.pm >>
|
||||
SELECTED_PM: << parameters.pm >>
|
||||
SELECTED_CLI: << parameters.cli >>
|
||||
|
||||
workflows:
|
||||
@ -95,19 +127,31 @@ workflows:
|
||||
matrix:
|
||||
parameters:
|
||||
os: ['linux']
|
||||
packages:
|
||||
[
|
||||
'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',
|
||||
]
|
||||
packages: *nx_cli
|
||||
- e2e:
|
||||
matrix:
|
||||
parameters:
|
||||
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'
|
||||
|
||||
1
.github/workflows/e2e-matrix.yml
vendored
1
.github/workflows/e2e-matrix.yml
vendored
@ -49,6 +49,7 @@ jobs:
|
||||
- name: Run e2e tests
|
||||
run: yarn e2e ${{ matrix.packages }} affected
|
||||
env:
|
||||
NX_E2E_CI_CACHE_KEY: e2e-gha-${{ matrix.node_version }}-${{ matrix.package_manager }}
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
SELECTED_PM: ${{ matrix.package_manager }}
|
||||
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"],
|
||||
"canTrackAnalytics": false,
|
||||
"showUsageWarnings": true,
|
||||
"runtimeCacheInputs": ["echo $SELECTED_CLI"],
|
||||
"runtimeCacheInputs": [
|
||||
"echo $SELECTED_CLI",
|
||||
"echo $NX_E2E_CI_CACHE_KEY"
|
||||
],
|
||||
"cacheDirectory": "/tmp/nx-cache"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user