Unit test #87
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: Unit test | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-22.04"] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --group dev --extra estimate-area | |
| - name: Show Python and pytest versions | |
| run: | | |
| uv run python --version | |
| uv run pytest --version | |
| - name: Run pre-commit checks | |
| run: uv run pre-commit run --all-files | |
| - name: Run tests with coverage | |
| run: uv run pytest --cov --cov-config=.coveragerc --cov-report=xml | |
| - name: List all files in current directory | |
| run: ls -la | |
| - name: Upload coverage to GitHub (optional, internal) | |
| if: matrix.python-version == '3.10' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage.xml |