Skip to content

Commit

Permalink
Merge pull request #3498 from sidharthv96/sidv/parallelE2E
Browse files Browse the repository at this point in the history
[DevOps] Parallel E2E
  • Loading branch information
knsv authored Sep 21, 2022
2 parents 146c2e2 + 065756a commit eea31a1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
39 changes: 24 additions & 15 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,39 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [16.x]
containers: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
id: yarn-and-build-cache
with:
path: |
~/.cache/Cypress
build
node_modules
key: ${{ runner.os }}-node_modules-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-build-
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache: yarn
node-version: ${{ matrix.node-version }}

- name: Install Yarn
run: npm i yarn --global

- name: Install Packages
run: |
yarn install --frozen-lockfile
env:
CYPRESS_CACHE_FOLDER: .cache/Cypress

- name: Run Build
run: yarn build

- name: Run E2E Tests
run: yarn e2e
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v3
with:
start: yarn dev
wait-on: 'http://localhost:9000'
record: true
headless: true
parallel: true
env:
CYPRESS_CACHE_FOLDER: .cache/Cypress
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
1 change: 1 addition & 0 deletions cypress.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const { defineConfig } = require('cypress');
const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin');

module.exports = defineConfig({
projectId: 'n2sma2',
e2e: {
specPattern: 'cypress/integration/**/*.{js,jsx,ts,tsx}',
setupNodeEvents(on, config) {
Expand Down

0 comments on commit eea31a1

Please sign in to comment.