Skip to content

Commit

Permalink
chore(repo): split windows e2e to a separate nightly workflow (nrwl#8069
Browse files Browse the repository at this point in the history
)
  • Loading branch information
meeroslav authored Dec 9, 2021
1 parent 4032a11 commit 366c2f0
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/e2e-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
os:
- ubuntu-latest
- macos-latest
- windows-latest
# - windows-latest
include:
- os: ubuntu-latest
os-name: ubuntu
os-cache-dir: /tmp/nx-cache
- os: macos-latest
os-name: osx
os-cache-dir: /tmp/nx-cache
- os: windows-latest
os-name: windows
os-cache-dir: ./nx-cache
# - os: windows-latest
# os-name: windows
# os-cache-dir: ./nx-cache
node_version:
- '16'
package_manager:
Expand Down Expand Up @@ -77,17 +77,19 @@ jobs:
packages: e2e-storybook
- os: macos-latest
packages: e2e-workspace-integrations,e2e-workspace-core,e2e-workspace-create
# run just npm on windows
- os: windows-latest
package_manager: yarn
- os: windows-latest
package_manager: pnpm
# exclude react-native from windows
- os: windows-latest
packages: e2e-react-native,e2e-detox
- os: macos-latest
packages: e2e-add-nx-to-monorepo
# # run just npm on windows
# - os: windows-latest
# package_manager: yarn
# - os: windows-latest
# package_manager: pnpm
# # exclude react-native from windows
# - os: windows-latest
# packages: e2e-react-native,e2e-detox
fail-fast: false

name: ${{ matrix.os-name }}/${{ matrix.package_manager }}/v${{ matrix.node_version }} - ${{ matrix.packages }}
name: ${{ matrix.os-name }}/${{ matrix.package_manager }} - ${{ matrix.packages }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: E2E matrix (Windows)

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false

jobs:
e2e:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-latest
include:
- os: windows-latest
os-name: windows
os-cache-dir: ./nx-cache
node_version:
- '16'
package_manager:
- npm
packages:
- e2e-angular-core,e2e-angular-extensions
- e2e-cli,e2e-nx-plugin,e2e-jest,e2e-linter
- e2e-cypress
- e2e-gatsby,e2e-react
- e2e-next
- e2e-node
- e2e-web
- e2e-storybook
- e2e-workspace-integrations,e2e-workspace-core,e2e-workspace-create
- e2e-add-nx-to-monorepo
fail-fast: false

name: ${{ 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: 6.9.1

- 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: Run e2e tests
run: yarn nx run-many --target=e2e --projects="${{ join(matrix.packages) }}" --max-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/action-tmate@v3
with:
sudo: ${{ matrix.os != 'windows-latest' }} # disable sudo for windows debugging

report:
if: ${{ always() && github.repository_owner == 'nrwl' && github.event_name != 'workflow_dispatch' }}
needs: e2e
runs-on: ubuntu-latest
name: Report status
steps:
- name: Send notification
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ needs.e2e.result }}
message_format: '{emoji} *{workflow}* {status_message} (last commit <{commit_url}|{commit_sha}>)'
notification_title: '{workflow} has {status_message}'
footer: '<{run_url}|View Run>'
mention_users: 'U01UELKLYF2,U9NPA6C90'
mention_users_when: 'failure,warnings'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}

0 comments on commit 366c2f0

Please sign in to comment.