-
Notifications
You must be signed in to change notification settings - Fork 208
54 lines (42 loc) · 1.52 KB
/
playwright.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Playwright Tests
env:
SECRET_KEY: insecure_test_key
PORT: 8001
CONTRACTS_API_URL: https://contracts.staging.canonical.com
STRIPE_PUBLISHABLE_KEY: pk_test_yndN9H0GcJffPe0W58Nm64cM00riYG4N46
CAPTCHA_TESTING_API_KEY: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
on:
pull_request:
branches: [ main ]
jobs:
run-playwright:
if: github.repository == 'canonical/ubuntu.com'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: yarn install --immutablee
- name: Install dependencies
run: npm install -g yarn && yarn
- name: Install dotrun
run: sudo pip3 install dotrun requests==2.31.0 # requests version is pinned to avoid breaking changes, can be removed once issue is resolved: https://github.com/docker/docker-py/issues/3256resolved: https://github.com/docker/docker-py/issues/3256
- name: Install dependencies
run: |
sudo chmod -R 777 .
dotrun install
- name: Build assets
run: dotrun build
- name: Run dotrun
run: |
dotrun &
curl --head --fail --retry-delay 1 --retry 30 --retry-connrefused http://localhost:8001
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
env:
PLAYWRIGHT_USER_ID: ${{ secrets.PLAYWRIGHT_USER_ID }}
PLAYWRIGHT_USER_PASSWORD : ${{ secrets.PLAYWRIGHT_USER_PASSWORD }}
run: yarn playwright test