Feat/docs and tests: Add tests for utils and code coverage #7
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: Run Tests with uv on Pull Request | |
on: | |
pull_request: | |
branches: | |
- main # or your default branch | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" # Match your local Python version | |
- name: Install uv | |
run: | | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Install dependencies with uv | |
run: | | |
uv venv | |
uv pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
uv run pytest --cov --cov-branch --cov-report=xml | |
uv run ruff check | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: CalvoM/my-chess-style |