Skip to content

feat: initialize Task 3 - Enhanced Semantic Search Capabilities #6

feat: initialize Task 3 - Enhanced Semantic Search Capabilities

feat: initialize Task 3 - Enhanced Semantic Search Capabilities #6

name: Comprehensive Testing
on:
push:
branches: [main, development]
paths-ignore:
- '**.md'
- '**/docs/**'
pull_request:
branches: [main, development]
paths-ignore:
- '**.md'
- '**/docs/**'
workflow_dispatch:
jobs:
changed-files:
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.filter.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
src:
- 'src/**'
tests:
- 'tests/**'
workflows:
- '.github/workflows/**'
config:
- 'pyproject.toml'
- 'requirements.txt'
- 'setup.cfg'
- name: Set output if any relevant files changed
run: echo "any_changed=${{ steps.filter.outputs.src == 'true' || steps.filter.outputs.tests == 'true' || steps.filter.outputs.config == 'true' }}" >> $GITHUB_OUTPUT
test:
needs: changed-files
if: needs.changed-files.outputs.any_changed == 'true'
runs-on: ubuntu-latest
env:
ENVIRONMENT: ci
PYTHONUNBUFFERED: 1
PIXI_ENV: ci
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install pixi
uses: prefix-dev/[email protected]
- name: Install dependencies (pixi)
run: pixi install
- name: Install dev dependencies
run: pixi run dev
- name: Lint
run: pixi run lint
- name: Typecheck
run: pixi run typecheck
- name: Run unit tests
run: pixi run test -m unit --json-report --json-report-file=pytest-unit.json
- name: Run integration tests
run: pixi run test -m integration --json-report --json-report-file=pytest-integration.json
- name: Run e2e tests
run: pixi run test -m e2e --json-report --json-report-file=pytest-e2e.json
- name: Run all tests with coverage
run: pixi run test-coverage-json
- name: Upload coverage and test artifacts
uses: actions/upload-artifact@v4
with:
name: test-artifacts
path: |
.coverage
coverage.json
pytest-unit.json
pytest-integration.json
pytest-e2e.json
- name: Quality Gate (with dependencies)
run: |
pixi run quality-gate
- name: Regression Testing & Baseline Comparison
run: |
if [ -f coverage.json ]; then
pixi run coverage-trend
fi
- name: Coverage Diff Analysis
run: |
if [ -f coverage.json ]; then
pixi run test-coverage-json
fi
- name: Notify Results (GitHub API)
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \
-d '{"state": "success", "context": "Comprehensive Tests", "description": "All tests and quality checks complete."}'