Skip to content

Commit

Permalink
fix: moved workflow to new file. Started testing cloudflare preview u…
Browse files Browse the repository at this point in the history
…rl package
  • Loading branch information
JonathanConn committed Aug 1, 2023
1 parent eb121ca commit 965c68c
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 31 deletions.
32 changes: 1 addition & 31 deletions .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,4 @@ jobs:
- name: install
run: npm ci
- name: check
run: npm run ${{ matrix.style-command }}

e2e_tests:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: install deps
run: npm ci
- name: build
run: npm run build
env:
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ./laboratory
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: ./laboratory/playwright-report/
retention-days: 30
run: npm run ${{ matrix.style-command }}
51 changes: 51 additions & 0 deletions .github/workflows/pr_e2e_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Pull request E2E tests

on:
pull_request:
branches:
- V2

jobs:
e2e_tests:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
deployments: write
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup-node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: install deps
run: npm ci
- name: build
run: npm run build
env:
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: cloudflare-preview-url
id: cloudflare_preview_url
uses: zentered/[email protected]
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
with:
cloudflare_project_id: ${{ secrets.CF_ZONE_ID}}
wait_until_ready: true
- name: Get URL
run: echo "https://${{ steps.cloudflare_preview_url.outputs.preview_url }}"
# - name: Run Playwright tests
# working-directory: ./laboratory
# run: npx playwright test
# - uses: actions/upload-artifact@v3
# if: always()
# with:
# name: playwright-report
# path: ./laboratory/playwright-report/
# retention-days: 30

0 comments on commit 965c68c

Please sign in to comment.