Skip to content

Update e2e-tests.yaml #5

Update e2e-tests.yaml

Update e2e-tests.yaml #5

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
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
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_EDIT_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: irenestorybook
directory: cypress-static
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
cypress-run:
runs-on: [ubuntu-latest]
needs: deploy
steps:
- 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.cloudflare_deploy.outputs.url }}