* fix: add org email into ics * perf test * update * fix: address bot comments on performance tests - Add validation to randomSleep function to ensure min <= max - Replace new Date().getTime() with Date.now() for better performance - Move hardcoded test credentials to environment variables - Add HTTP timeout to requests in helpers.js - Improve DOM element checking to be less brittle - Fix spike test sleep duration from 0.01s to 0.1s - Make GitHub workflow BASE_URL configurable with inputs - Fix README filename reference from booking_flow.js to booking.js - Add documentation for new environment variables Co-Authored-By: [email protected] <[email protected]> * Add script and small sec check * chore: fix script path * chore: fix script path * chore: change default url --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Volnei Munhoz <[email protected]>
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: Performance Tests
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
workflow_dispatch:
|
|
inputs:
|
|
base_url:
|
|
description: 'Base URL for performance tests'
|
|
required: false
|
|
default: 'https://cal.dev'
|
|
|
|
jobs:
|
|
performance-tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
BASE_URL: ${{ github.event.inputs.base_url || 'https://cal.dev' }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup K6
|
|
uses: grafana/setup-k6-action@v1
|
|
with:
|
|
k6-version: '1.0.0'
|
|
|
|
- name: Run Smoke Tests
|
|
uses: grafana/run-k6-action@v1
|
|
env:
|
|
K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }}
|
|
K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
|
|
with:
|
|
path: tests/performance/smoke/*.js
|
|
cloud-run-locally: true
|
|
fail-fast: true
|
|
|
|
- name: Run Load Tests
|
|
uses: grafana/run-k6-action@v1
|
|
env:
|
|
K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }}
|
|
K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
|
|
with:
|
|
path: tests/performance/load/*.js
|
|
cloud-run-locally: true
|
|
fail-fast: true
|
|
|
|
- name: Run Stress Tests
|
|
uses: grafana/run-k6-action@v1
|
|
env:
|
|
K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }}
|
|
K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
|
|
with:
|
|
path: tests/performance/stress/*.js
|
|
cloud-run-locally: true
|
|
fail-fast: true
|
|
|
|
- name: Run Spike Tests
|
|
uses: grafana/run-k6-action@v1
|
|
env:
|
|
K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }}
|
|
K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
|
|
with:
|
|
path: tests/performance/spike/*.js
|
|
cloud-run-locally: true
|
|
fail-fast: true
|