Skip to content

feat(audit): add internal audit API client #962

feat(audit): add internal audit API client

feat(audit): add internal audit API client #962

Workflow file for this run

name: Campus Tests
on:
push:
branches: [main, staging, weekly]
pull_request:
branches: [main, staging, weekly]
types: [opened, synchronize, reopened, ready_for_review]
env:
# Test timeout configuration (in seconds)
UNIT_TEST_TIMEOUT: 60
INTEGRATION_TEST_TIMEOUT: 300
jobs:
unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 3
env:
ENV: testing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
# Configure Poetry to use system Python (not its own bundled version)
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Install Campus Suite
run: poetry install --no-root
- name: Run Unit Tests
run: .venv/bin/python tests/run_tests.py unit --timeout ${{ env.UNIT_TEST_TIMEOUT }} -v
integration-tests:
runs-on: ubuntu-latest
timeout-minutes: 8
# Run integration tests for all target branches
# Required to pass for staging/main, optional for weekly
continue-on-error: ${{ github.base_ref == 'weekly' || (github.event_name == 'push' && github.ref_name == 'weekly') }}
env:
ENV: testing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
# Configure Poetry to use system Python (not its own bundled version)
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Install Campus Suite
run: poetry install --no-root
- name: Run Integration Tests (required for staging/main, optional for weekly)
run: .venv/bin/python tests/run_tests.py integration --timeout ${{ env.INTEGRATION_TEST_TIMEOUT }} -v
type-check:
runs-on: ubuntu-latest
timeout-minutes: 3
env:
ENV: testing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
# Configure Poetry to use system Python (not its own bundled version)
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Install Campus Suite
run: poetry install --no-root
- name: Run Type Checks
run: poetry run python tests/run_tests.py type