-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (66 loc) · 2.33 KB
/
smart_ui_test.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Smart UI Test
on:
# Manual triggers with workflow_dispatch
workflow_dispatch:
push:
branches:
- "main"
# Add this part if you want to schedule test rerun
# schedule:
# Runs once every 4 hours
# - cron: '0 18 * * *'
# Runs every 2 hours
# - cron: '0 */2 * * *'
# Runs from 9AM to 5PM PST every 2 hours and one last run at 10PM on weekdays.
# Total 6,732 runs approx per month
# - cron: '0 1,6,17,19,21,23 * * 1-5'
# Runs at 10AM & 10PM PST on weekends.
# Total 816 runs approx per month
# - cron: '0 6,18 * * 6,0'
jobs:
cypress-smart-ui-tests:
name: E2E Test Run
timeout-minutes: 30
runs-on: ubuntu-22.04
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving the Dashboard hanging ...
fail-fast: false
matrix:
# run copies of the current job in parallel
containers: [1]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full repository history
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Install project
run: |
npm ci
- name: "Smoke Tests - Chrome"
run: npm run cypress:lambda
env:
ENV: "production"
BRANCH_NAME: ${{ github.base_ref || github.ref_name }}
GITHUB_SHA: ${{ github.sha }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#LambdaTest SmartUI Token
LT_USERNAME: ${{ secrets.LT_USERNAME }}
LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}
PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }}
# Pre-production authentication
CYPRESS_BASIC_AUTH_USERNAME: ${{ secrets.BASIC_AUTH_USERNAME }}
CYPRESS_BASIC_AUTH_PASSWORD: ${{ secrets.BASIC_AUTH_PASSWORD }}
#Login info
CYPRESS_USERNAME: ${{ secrets.USERNAME }}
CYPRESS_PASSWORD: ${{ secrets.PASSWORD }}