-
Notifications
You must be signed in to change notification settings - Fork 17
33 lines (33 loc) · 1.42 KB
/
playwright.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
name: E2E Tests
on:
deployment_status:
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
if: github.event.deployment_status.state == 'success'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Playwright
run: npx playwright install --with-deps
- name: Determine Tenant Name
run: |
if [[ "${{ github.event.deployment_status.environment }}" == "Preview – agora-next-etherfi" ]]; then
echo "NEXT_PUBLIC_AGORA_INSTANCE_NAME=etherfi" >> $GITHUB_ENV
elif [[ "${{ github.event.deployment_status.environment }}" == "Preview – agora-next-ens" ]]; then
echo "NEXT_PUBLIC_AGORA_INSTANCE_NAME=ens" >> $GITHUB_ENV
elif [[ "${{ github.event.deployment_status.environment }}" == "Preview – agora-next" ]]; then
echo "NEXT_PUBLIC_AGORA_INSTANCE_NAME=optimism" >> $GITHUB_ENV
fi
# You can add more conditions as needed for other environments
- name: Run Playwright tests
run: npx playwright test
env:
PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }}
VERCEL_ENV: ${{ github.event.deployment_status.environment }}
NEXT_PUBLIC_AGORA_INSTANCE_NAME: ${{ env.NEXT_PUBLIC_AGORA_INSTANCE_NAME }}