Skip to content

Merge pull request #863 from WTW-IM/fix-types-export #1251

Merge pull request #863 from WTW-IM/fix-types-export

Merge pull request #863 from WTW-IM/fix-types-export #1251

Workflow file for this run

name: Cypress CI
on:
pull_request_target:
types: [opened, reopened, synchronize]
push:
branches:
- main
- pre-prod
workflow_dispatch:
env:
ES_COMPONENTS_DIR: packages/es-components
jobs:
run-cypress:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PIPELINE_BOT_PAT }}
ref: ${{ github.head_ref || github.ref }}
repository: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name) || github.repository }}
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'npm'
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-
- name: Install Dependencies
run: |
npm i --prefer-offline --no-audit
- name: Setup Cypress
working-directory: ${{ env.ES_COMPONENTS_DIR }}
run: |
npx cypress install
npm start &
npm run wait-for-start
- uses: cypress-io/github-action@v6
with:
working-directory: ${{ env.ES_COMPONENTS_DIR }}
config-file: cypress.config.ts
install: false
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: ${{ env.ES_COMPONENTS_DIR }}/cypress/screenshots
- run: npm run cypressreport
working-directory: ${{ env.ES_COMPONENTS_DIR }}
- name: Create Status check based on merged cypress results
if: always()
id: process-cypress
uses: im-open/process-cypress-test-results@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
results-file: ${{ env.ES_COMPONENTS_DIR }}/raw-results.json
report-name: 'Cypress ${{ github.run_number }}'
create-status-check: true
create-pr-comment: true
update-comment-if-one-exists: true
ignore-test-failures: false
timezone: 'america/denver'