Skip to content

ci(lambdatest): lT env variables added #4

ci(lambdatest): lT env variables added

ci(lambdatest): lT env variables added #4

Workflow file for this run

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: 15
runs-on: ubuntu-22.04
container:
image: cypress/browsers:latest
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
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Install project
run: |
npm ci
- name: Cypress info
run: npx cypress info
- name: Node info
run: node -v
- name: "Smoke Tests - Chrome"
uses: cypress-io/github-action@v6
with:
browser: chrome
command: npm run cypress:lambda
env:
ENV: "production"
BRANCH_NAME: ${{ github.base_ref || github.ref_name }}
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 }}