Skip to content

cypress POC with github actions #11

cypress POC with github actions

cypress POC with github actions #11

Workflow file for this run

name: E2E Test
on:
push:
branches: cypress-experiment
pull_request:
types: [opened, reopened]
jobs:
e2e-tests:
runs-on: [ubuntu-latest]
concurrency:
group: ${{ github.workflow }}-ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
deployments: write
name: Run E2E Tests
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
id: cloudflare_deploy
with:
apiToken: ${{ secrets.CYPRESS_TEST_CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CYPRESS_TEST_CLOUDFLARE_ACCOUNT_ID }}
projectName: cypresstest
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Cypress run
uses: cypress-io/github-action@v5
env:
TEST_USERNAME: ${{ secrets.CYPRESS_TEST_USERNAME}}
TEST_PASSWORD: ${{ secrets.CYPRESS_TEST_PASSWORD }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_TEST_RECORD_ID}}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_TEST_PROJECT_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
install: false
config: pageLoadTimeout=100000,baseUrl=${{ steps.cloudflare_deploy.outputs.url }}
record: true
parallel: true