Add CSV export support for SuiteResultAdd csv reports #117
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Continuous Integration workflow for AgentUnit | |
| # Runs tests, linting, and type checking on every PR and push to main branches | |
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint & Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install --with dev --no-interaction | |
| - name: Validate project metadata | |
| run: poetry check | |
| - name: Run ruff linter | |
| run: poetry run ruff check src/ tests/ | |
| - name: Run ruff formatter check | |
| run: poetry run ruff format --check src/ tests/ | |
| test: | |
| name: Test (Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| exclude: | |
| # Reduce matrix size - only test all Python versions on Ubuntu | |
| - os: windows-latest | |
| python-version: "3.11" | |
| - os: macos-latest | |
| python-version: "3.11" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Poetry (Windows fallback) | |
| if: runner.os == 'Windows' | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install poetry | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: ${{ runner.os }}-py${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-py${{ matrix.python-version }}-poetry- | |
| - name: Install dependencies | |
| run: poetry install --with dev | |
| - name: Run tests with coverage | |
| run: | | |
| poetry run pytest tests/ -v --cov=src/agentunit --cov-report=xml --cov-report=term-missing | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage.xml | |
| fail_ci_if_error: false | |
| continue-on-error: true | |
| build: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| needs: [lint, test] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| - name: Build package | |
| run: poetry build | |
| - name: Check package | |
| run: | | |
| pip install twine | |
| twine check dist/* | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| retention-days: 7 | |
| docs: | |
| name: Documentation Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Check documentation files exist | |
| run: | | |
| # Verify essential documentation exists | |
| test -f README.md | |
| test -f CONTRIBUTING.md | |
| test -f CHANGELOG.md | |
| test -f SECURITY.md | |
| test -f LICENSE | |
| echo "✅ All essential documentation files present" | |
| - name: Check for broken internal links | |
| run: | | |
| # Simple check for common broken link patterns | |
| if grep -r "](docs/.*\.md)" README.md 2>/dev/null | grep -v "^Binary"; then | |
| echo "Found documentation links in README, checking they exist..." | |
| for link in $(grep -oP '\]\(docs/[^)]+' README.md | sed 's/](//'); do | |
| if [ ! -f "$link" ]; then | |
| echo "❌ Broken link: $link" | |
| exit 1 | |
| fi | |
| done | |
| fi | |
| echo "✅ Documentation links check passed" |