Merge pull request #32 from swhume/fix/skill-review #24
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
| name: CI | |
| on: | |
| push: | |
| branches: [master, develop] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| # Skill tests are excluded here and run once, in the single cell below. | |
| - name: Run tests | |
| run: python -m pytest tests/ -v --tb=short --ignore-glob='*test_skill_*.py' | |
| # The skill tests assert Python-level API facts, file checksums, and that | |
| # the bundled examples execute -- none of which is platform-specific, so | |
| # one cell is enough. Running the 8 examples on all 12 adds cost, not signal. | |
| - name: Skill checks | |
| if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' | |
| run: python -m pytest tests/test_skill_contract.py tests/test_skill_bundle.py tests/test_skill_examples.py -v --tb=short | |
| - name: Run tests with coverage | |
| if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' | |
| run: | | |
| python -m pytest tests/ --cov=odmlib --cov-report=xml --cov-report=term-missing | |
| - name: Check coverage threshold | |
| if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' | |
| run: | | |
| python -m pytest tests/ --cov=odmlib --cov-fail-under=70 | |
| - name: Upload coverage | |
| if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage.xml |