Update ovld #116
This file contains 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: Python package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Set up uv | |
uses: hynek/setup-cached-uv@v2 | |
with: | |
cache-dependency-path: uv.lock | |
- name: Pin Python version | |
run: uv python pin ${{ matrix.python-version }} | |
- name: Lint check | |
run: uvx ruff check | |
- name: Check formatting | |
run: uvx ruff format --check | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
settings: | |
- python: '3.9' | |
coverage: false | |
- python: '3.10' | |
coverage: false | |
- python: '3.11' | |
coverage: false | |
- python: '3.12' | |
coverage: true | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Set up uv | |
uses: hynek/setup-cached-uv@v2 | |
with: | |
cache-dependency-path: uv.lock | |
- name: Pin Python version | |
run: uv python pin ${{ matrix.settings.python }} | |
- name: Sync dependencies | |
run: uv sync --all-extras | |
- name: Test with pytest | |
if: ${{ !matrix.settings.coverage }} | |
run: uv run pytest tests/ | |
- name: Test with pytest and coverage | |
if: ${{ matrix.settings.coverage }} | |
run: uv run pytest --cov=src --cov-report term-missing tests/ | |
- name: Verify coverage | |
if: ${{ matrix.settings.coverage }} | |
run: uv run coverage report | tail -1 | egrep "TOTAL +[0-9]+ +0 +100%" |