Skip to content

Quality Gates

Quality Gates #40

Workflow file for this run

name: Quality Gates
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
inputs:
suite:
description: 'Suite to run'
required: true
type: choice
default: all
options:
- all
- static
- e2e
- performance
env:
PYTHON_VERSION: '3.11'
UV_VERSION: '0.5.11'
jobs:
static-analysis:
if: ${{ github.event_name == 'schedule' || github.event.inputs.suite == 'static' || github.event.inputs.suite == 'all' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install dependencies
run: |
uv sync --locked --all-extras --dev
npm install -g jscpd
- name: Run static checks script
run: uv run bash scripts/run_static_checks.sh
- name: Upload reports
uses: actions/upload-artifact@v4
with:
name: static-reports
path: reports/static
e2e:
if: ${{ github.event_name == 'schedule' || github.event.inputs.suite == 'e2e' || github.event.inputs.suite == 'all' }}
runs-on: ubuntu-latest
env:
DEEPGRAM_API_KEY: dummy_test_key
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install FFmpeg
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Install dependencies
run: |
uv sync --locked --all-extras --dev
- name: Run E2E test suite
run: uv run pytest tests/e2e/ -v --timeout=900
- name: Upload results
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-results
path: .
performance:
# Manual-only: CI cannot generate test data files required by TestDataManager
if: ${{ github.event.inputs.suite == 'performance' }}
runs-on: ubuntu-latest
env:
DEEPGRAM_API_KEY: dummy_test_key
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install FFmpeg
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Install dependencies
run: |
uv sync --locked --all-extras --dev
- name: Run performance tests
run: uv run pytest tests/e2e/test_performance.py -v --timeout=1800
- name: Upload results
if: always()
uses: actions/upload-artifact@v4
with:
name: performance-results
path: .