element-plus/.github/workflows/cypress.yml
jeremywu 57b4aa7d20
fix(ci): cypress ininite waiting (#5288)
- Serve the page in background which blocks the thread
2022-01-10 22:48:27 +08:00

40 lines
902 B
YAML

name: Cypress E2E testing
on:
workflow_run:
workflows: ['Website Preview']
types: [completed]
jobs:
cypress-run:
name: Cypress Run
runs-on: ubuntu-latest
container: cypress/browsers:node14.7.0-chrome84
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow.id }}
run_id: ${{ github.event.workflow_run.id }}
name: docs
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Install serve
run: pnpm install serve -D -w
- name: Serve documentation site
run: pnpm exec serve docs -p 5001 &
- name: Run Cypress
run: npx cypress run