Skip to content

UI tests (live)

UI tests (live) #807

Workflow file for this run

name: UI tests (live)
on:
workflow_dispatch:
schedule:
- cron: '0 */12 * * *'
env:
NEW_RELIC_APP_NAME: ${{ secrets.NEW_RELIC_APP_NAME }}
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
NEXT_PUBLIC_URL: ${{ secrets.NEXT_PUBLIC_URL }}
NEXT_PUBLIC_SANITY_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_SANITY_PROJECT_ID }}
PNPM_VERSION: 9.12.3
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}
jobs:
test:
name: e2e live
runs-on: ubuntu-latest
timeout-minutes: 20
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: install dependencies
uses: ./.github/actions/install
- name: UI tests prod
uses: ./.github/actions/ui-test
with:
target: e2e-prod
discord-fail-message:
runs-on: ubuntu-latest
if: failure()
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
with:
path: apps/lambda
- name: Get current time
id: current-time
run: echo "TIME=$(date -u)" >> $GITHUB_ENV
- name: Get deployedAt from lhowsam.com
id: fetch-deployedAt
run: |
response=$(curl -s https://lhowsam.com/api/version)
deployedAt=$(echo $response | jq -r '.deployedAt')
echo "DEPLOYED_AT=$deployedAt" >> $GITHUB_ENV
- name: Discord fail notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_LIVE_WEBHOOK_URL }}
uses: Ilshidur/action-discord@master
with:
args: |
🚨 Live UI tests lhowsam.com failed! 🚨
**Failure Time**: ${{ env.TIME }}
**Last deployed at**: ${{ env.DEPLOYED_AT }}
**Vercel Status**: https://www.vercel-status.com
**CF status**: https://www.cloudflarestatus.com