-
Notifications
You must be signed in to change notification settings - Fork 200
42 lines (36 loc) · 1.42 KB
/
cypress-pr.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
name: Cypress checks / PR
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
MARKETO_API_CLIENT: ${{secrets.MARKETO_API_CLIENT}}
MARKETO_API_SECRET: ${{secrets.MARKETO_API_SECRET}}
on: pull_request
jobs:
run-cypress:
if: github.repository == 'canonical/ubuntu.com'
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install python dependencies
run: pip3 install -r requirements.txt
- name: Cypress run
uses: cypress-io/github-action@v2
with:
# This is a dummy account that contains no sensitive information and is only used for testing
# This is to workaround the fact that GitHub secrets cannot be used in pull requests from forks
env: UBUNTU_USERNAME=peter.makowski+dummy-cypress-account@canonical.com,UBUNTU_PASSWORD=9BKfSNo2&2Zs
build: yarn run build
start: yarn run serve
wait-on: "http://0.0.0.0:8001/_status/check"
wait-on-timeout: 300
browser: chrome
config-file: tests/cypress/cypress.json
config: baseUrl=http://0.0.0.0:8001