-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (28 loc) · 1.17 KB
/
run-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Run e2e tests
on:
deployment_status:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run-e2es:
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/checkout@v3
- name: Install dependencies
run: pnpm install && npx playwright install --with-deps
- name: Make .env.test file
run: |
echo "NEXT_PUBLIC_EPCC_CLIENT_ID=${E2E_NEXT_PUBLIC_EPCC_CLIENT_ID}" > ./examples/simple/.env.test
echo "EPCC_CLIENT_SECRET=${E2E_EPCC_CLIENT_SECRET}" >> ./examples/simple/.env.test
echo "NEXT_PUBLIC_EPCC_ENDPOINT_URL=${E2E_NEXT_PUBLIC_EPCC_ENDPOINT_URL}" >> ./examples/simple/.env.test
echo "NEXT_PUBLIC_COOKIE_PREFIX_KEY=${E2E_NEXT_PUBLIC_COOKIE_PREFIX_KEY}" >> ./examples/simple/.env.test
echo "SITE_NAME=${E2E_SITE_NAME}" >> ./examples/simple/.env.test
- name: Run tests
run: pnpm test:e2e
env:
BASE_URL: ${{ github.event.deployment_status.environment_url }}