forked from saleor/storefront
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.51 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: E2E Tests
on:
workflow_dispatch:
inputs:
environment:
required: true
description: "Environment to run tests against"
default: "https://staging-demo.saleor.io"
type: choice
options:
- https://staging-demo.saleor.io/
- https://demo.saleor.io/
schedule:
- cron: "00 2 * * 1-5"
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.11.0 # version used by Vercel
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "pnpm"
- name: Get env
id: get-env-uri
env:
DEFAULT_ENV_URI: "https://staging-demo.saleor.io"
run: |
echo "ENV_URI=${{ github.event.inputs.environment || env.DEFAULT_ENV_URI }}" >> $GITHUB_OUTPUT
- name: Cypress run on demo
uses: cypress-io/github-action@v4
with:
record: true
config: baseUrl=${{ steps.get-env-uri.outputs.ENV_URI }}
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SALEOR_API_URL: ${{ steps.get-env-uri.outputs.ENV_URI }}graphql/
CYPRESS_USER_EMAIL: "admin@example.com"
CYPRESS_USER_PASSWORD: "admin"
CYPRESS_DIGITAL_PRODUCT: "cloud"
CYPRESS_WITHOUT_VARIANTS: "beanie"
CYPRESS_WITH_VARIANTS: "zoom"
CYPRESS_PRODUCT_TO_SEARCH: "polo"