Skip to content

Update e2e-tests.yaml #8

Update e2e-tests.yaml

Update e2e-tests.yaml #8

Workflow file for this run

name: E2E Test
on:
push:
branches: cypress-experiment
pull_request:
types: [opened, reopened]
jobs:
deploy:
runs-on: [ubuntu-latest]
concurrency:
group: ${{ github.workflow }}-ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
outputs:
deploy_url: ${{ steps.cloudflare_deploy.outputs.url }}
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 }}
cypress-run:
runs-on: [ubuntu-latest]
needs: deploy
steps:
- uses: actions/checkout@v3
- name: Cypress run
uses: cypress-io/github-action@v5
env:
TEST_USERNAME: ${{ secrets.CYPRESS_TEST_USERNAME}}
TEST_PASSWORD: ${{ secrets.CYPRESS_TEST_PASSWORD }}
with:
config: pageLoadTimeout=100000,baseUrl=${{ needs.deploy.outputs.deploy_url }}