E2E tests #1313
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E tests | |
on: [deployment_status] | |
jobs: | |
set_pending: | |
name: Register pending E2E tests | |
if: github.event.deployment_status.state == 'pending' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set status to "pending" | |
uses: ./.github/actions/set-pr-status | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB }} | |
with: | |
state: pending | |
description: Waiting for E2E | |
run_tests: | |
name: Run E2E tests on deployment success | |
if: github.event.deployment_status.state == 'success' | |
runs-on: ubuntu-latest | |
container: cypress/included:9.5.4 | |
env: | |
NPM_RC: ${{ secrets.NPM_TOKEN }} | |
TERM: xterm | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set status to "running" | |
uses: ./.github/actions/set-pr-status | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB }} | |
with: | |
state: pending | |
description: E2E tests are running | |
- name: Install dependencies | |
run: yarn | |
- name: Run E2E tests | |
run: yarn e2e --config baseUrl=${{ github.event.deployment_status.target_url }} | |
- name: Set status to "success" | |
if: success() | |
uses: ./.github/actions/set-pr-status | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB }} | |
with: | |
state: success | |
description: E2E tests are passed | |
- name: Set status to "failure" | |
if: failure() | |
uses: ./.github/actions/set-pr-status | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB }} | |
with: | |
state: failure | |
description: Some of the E2E tests are failed |