Skip to content

Commit

Permalink
chore(dep-graph): re-enable project graph e2e (nrwl#10799)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipjfulcher authored Jun 25, 2022
1 parent 08899b1 commit 0ae2154
Show file tree
Hide file tree
Showing 19 changed files with 2,880 additions and 281 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ jobs:
- run:
name: Run E2E Tests
command: |
npx nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --exclude=e2e-detox,e2e-js,e2e-next,e2e-workspace-create,e2e-nx-run,e2e-nx-misc,e2e-react,e2e-web,e2e-angular-extensions,e2e-angular-core,e2e-nx-plugin,e2e-cypress,e2e-node,e2e-linter,e2e-jest,e2e-add-nx-to-monorepo,nx-dev-e2e,e2e-nx-init --parallel=1
npx nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --exclude=e2e-detox,e2e-js,e2e-next,e2e-workspace-create,e2e-nx-run,e2e-nx-misc,e2e-react,e2e-web,e2e-angular-extensions,e2e-angular-core,e2e-nx-plugin,e2e-cypress,e2e-node,e2e-linter,e2e-jest,e2e-add-nx-to-monorepo,nx-dev-e2e,e2e-nx-init,e2e-dep-graph-client --parallel=1
no_output_timeout: 45m
- run:
name: Stop All Running Agents for This CI Run
Expand Down
173 changes: 88 additions & 85 deletions .github/workflows/e2e-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- e2e-react-native
# - e2e-detox
- e2e-add-nx-to-monorepo
- e2e-dep-graph-client
exclude:
# exclude react-native and detox from ubuntu
- os: ubuntu-latest
Expand Down Expand Up @@ -77,95 +78,97 @@ jobs:
packages: e2e-workspace-create
- os: macos-latest
packages: e2e-add-nx-to-monorepo
- os: macos-latest
packages: e2e-dep-graph-client
fail-fast: false

name: ${{ matrix.os-name }}/${{ matrix.package_manager }} - ${{ matrix.packages }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install PNPM
if: ${{ matrix.package_manager == 'pnpm' }}
uses: pnpm/[email protected]
with:
version: 7.1.0

- name: Use Node.js ${{ matrix.node_version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node_version }}
registry-url: http://localhost:4872

- name: Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache yarn
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ matrix.os }}-node-${{ matrix.node_version }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ matrix.os }}-node-${{ matrix.node_version }}-yarn-
- name: Install packages
run: yarn install --prefer-offline --frozen-lockfile --non-interactive

- name: Cleanup
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
# Workaround to provide additional free space for testing.
# https://github.com/actions/virtual-environments/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get install lsof
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Homebrew cache directory path
if: ${{ matrix.os == 'macos-latest' }}
id: homebrew-cache-dir-path
run: echo "::set-output name=dir::$(brew --cache)"

- name: Cache Homebrew
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/cache@v2
with:
path: ${{ steps.homebrew-cache-dir-path.outputs.dir }}
key: brew-${{ matrix.node_version }}
restore-keys: |
brew-
- name: Install applesimutils, reset ios simulators
if: ${{ matrix.os == 'macos-latest' }}
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
xcrun simctl shutdown all && xcrun simctl erase all
- name: Run e2e tests
run: yarn nx run-many --target=e2e --projects="${{ join(matrix.packages) }}" --parallel=1
env:
GIT_AUTHOR_EMAIL: [email protected]
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: [email protected]
GIT_COMMITTER_NAME: Test
NX_E2E_CI_CACHE_KEY: e2e-gha-${{ matrix.os }}-${{ matrix.node_version }}-${{ matrix.package_manager }}
NX_E2E_RUN_CYPRESS: ${{ 'true' }}
NODE_OPTIONS: --max_old_space_size=8192
SELECTED_PM: ${{ matrix.package_manager }}
npm_config_registry: http://localhost:4872
YARN_REGISTRY: http://localhost:4872
NX_VERBOSE_LOGGING: ${{ 'true' }}
NX_E2E_SKIP_BUILD_CLEANUP: ${{ 'true' }}
NX_CACHE_DIRECTORY: ${{ matrix.os-cache-dir }}

- name: Setup tmate session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled && failure() }}
uses: mxschmitt/[email protected]
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install PNPM
if: ${{ matrix.package_manager == 'pnpm' }}
uses: pnpm/[email protected]
with:
version: 7.1.0

- name: Use Node.js ${{ matrix.node_version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node_version }}
registry-url: http://localhost:4872

- name: Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache yarn
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ matrix.os }}-node-${{ matrix.node_version }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ matrix.os }}-node-${{ matrix.node_version }}-yarn-
- name: Install packages
run: yarn install --prefer-offline --frozen-lockfile --non-interactive

- name: Cleanup
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
# Workaround to provide additional free space for testing.
# https://github.com/actions/virtual-environments/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get install lsof
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Homebrew cache directory path
if: ${{ matrix.os == 'macos-latest' }}
id: homebrew-cache-dir-path
run: echo "::set-output name=dir::$(brew --cache)"

- name: Cache Homebrew
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/cache@v2
with:
path: ${{ steps.homebrew-cache-dir-path.outputs.dir }}
key: brew-${{ matrix.node_version }}
restore-keys: |
brew-
- name: Install applesimutils, reset ios simulators
if: ${{ matrix.os == 'macos-latest' }}
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
xcrun simctl shutdown all && xcrun simctl erase all
- name: Run e2e tests
run: yarn nx run-many --target=e2e --projects="${{ join(matrix.packages) }}" --parallel=1
env:
GIT_AUTHOR_EMAIL: [email protected]
GIT_AUTHOR_NAME: Test
GIT_COMMITTER_EMAIL: [email protected]
GIT_COMMITTER_NAME: Test
NX_E2E_CI_CACHE_KEY: e2e-gha-${{ matrix.os }}-${{ matrix.node_version }}-${{ matrix.package_manager }}
NX_E2E_RUN_CYPRESS: ${{ 'true' }}
NODE_OPTIONS: --max_old_space_size=8192
SELECTED_PM: ${{ matrix.package_manager }}
npm_config_registry: http://localhost:4872
YARN_REGISTRY: http://localhost:4872
NX_VERBOSE_LOGGING: ${{ 'true' }}
NX_E2E_SKIP_BUILD_CLEANUP: ${{ 'true' }}
NX_CACHE_DIRECTORY: ${{ matrix.os-cache-dir }}

- name: Setup tmate session
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled && failure() }}
uses: mxschmitt/[email protected]

report-success:
if: ${{ github.repository_owner == 'nrwl' && github.event_name == 'workflow_dispatch' }} # only once it's fixed on manual dispatch
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- e2e-storybook,e2e-storybook-angular
- e2e-workspace-create
- e2e-add-nx-to-monorepo
- e2e-dep-graph-client
fail-fast: false

name: ${{ matrix.packages }}
Expand Down
45 changes: 26 additions & 19 deletions dep-graph/client-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,38 @@
"sourceRoot": "dep-graph/client-e2e/src",
"projectType": "application",
"targets": {
"e2e-disabled": {
"e2e-base": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "dep-graph/client-e2e/cypress.json",
"tsConfig": "dep-graph/client-e2e/tsconfig.e2e.json",
"devServerTarget": "dep-graph-client:serve-for-e2e",
"baseUrl": "http://localhost:4200"
}
},
"e2e-watch-disabled": {
"executor": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "dep-graph/client-e2e/cypress-watch-mode.json",
"tsConfig": "dep-graph/client-e2e/tsconfig.e2e.json",
"devServerTarget": "dep-graph-client:serve-for-e2e:watch",
"baseUrl": "http://localhost:4200"
}
},
"configurations": {
"dev": {
"cypressConfig": "dep-graph/client-e2e/cypress.json",
"devServerTarget": "dep-graph-client:serve"
},
"watch": {
"cypressConfig": "dep-graph/client-e2e/cypress-watch-mode.json",
"devServerTarget": "dep-graph-client:serve:watch"
},
"release": {
"cypressConfig": "dep-graph/client-e2e/cypress-release.json",
"devServerTarget": "dep-graph-client:serve:release"
}
},
"defaultConfiguration": "dev"
},
"e2e-release-disabled": {
"executor": "@nrwl/cypress:cypress",
"e2e": {
"executor": "nx:run-commands",
"outputs": [],
"options": {
"cypressConfig": "dep-graph/client-e2e/cypress-release.json",
"tsConfig": "dep-graph/client-e2e/tsconfig.e2e.json",
"devServerTarget": "dep-graph-client:serve-for-e2e:release",
"baseUrl": "http://localhost:4200"
"commands": [
"npx nx e2e-base e2e-dep-graph-client -c dev",
"npx nx e2e-base e2e-dep-graph-client -c watch",
"npx nx e2e-base e2e-dep-graph-client -c release"
],
"parallel": false
}
},
"lint": {
Expand Down
Loading

0 comments on commit 0ae2154

Please sign in to comment.