feat: constrai 0.4.0 #2
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
| # Runs the full test suite on every push to main and on every pull request. | |
| # Adapter modules that require optional packages are excluded from coverage | |
| # measurement (see [tool.coverage.run] omit in pyproject.toml); those are | |
| # covered by test-integrations.yml instead. | |
| name: Test | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| test: | |
| name: "Python ${{ matrix.python-version }} / ${{ matrix.os }}" | |
| runs-on: "${{ matrix.os }}" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.9", "3.11", "3.13"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "${{ matrix.python-version }}" | |
| cache: pip | |
| - name: Install package and dev dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Lint with ruff | |
| run: ruff check constrai/ tests/ examples/ | |
| - name: Type-check with mypy | |
| run: mypy constrai/ --ignore-missing-imports --no-error-summary | |
| - name: Run pytest with coverage | |
| run: | | |
| pytest tests/ -v --tb=short \ | |
| --cov=constrai \ | |
| --cov-report=term-missing \ | |
| --cov-fail-under=85 | |
| - name: Run chaos fuzzer | |
| run: python tests/chaos_fuzzer.py |