test: add comprehensive test suite and improve pre-commit hooks #46
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
| name: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**.md' | |
| jobs: | |
| check_code_formatting_types: | |
| name: Check code formatting with ruff and mypy | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| python-version: ["3.13"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv and set Python version ${{ matrix.python-version }} | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| activate-environment: true | |
| - name: Install dependencies | |
| run: uv pip install -r requirements-dev.txt | |
| - name: Check code formatting with pre-commit | |
| run: pre-commit run --all-files | |
| - name: Run tests with coverage | |
| run: | | |
| uv pip install numpy | |
| pytest -n auto --cov=benchmark --cov=tools --cov-report=xml --randomly-seed=random |