Skip to content

[chore:meta] Update path to issue templates #6

[chore:meta] Update path to issue templates

[chore:meta] Update path to issue templates #6

Workflow file for this run

name: Python Code Validator CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ "3.11", "3.12" ]
steps:
- name: Check out repository
uses: actions/checkout@v4
# Install uv
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
if: runner.os != 'Windows'
- name: Install uv (Windows)
run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
if: runner.os == 'Windows'
- name: Add uv to PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
if: runner.os != 'Windows'
- name: Add uv to PATH (Windows)
run: echo "$((Get-Item (Get-Command uv).Source).Directory.FullName)" | Out-File -FilePath $env:GITHUB_PATH -Append
if: runner.os == 'Windows'
# Settings Python and install ALL dependencies
- name: Set up Python and install dependencies
run: |
uv venv -p ${{ matrix.python-version }}
uv pip install -e ".[dev]"
- name: Activate venv and run checks
shell: bash
run: |
source .venv/bin/activate
echo "--- Running Lint and Format Check ---"
ruff check src/ tests/
ruff format --check src/ tests/
echo "--- Running Tests with Coverage ---"
coverage run -m unittest discover tests
# Step for Windows
- name: Activate venv and run checks (Windows)
shell: pwsh
if: runner.os == 'Windows'
run: |
.venv\Scripts\Activate.ps1
echo "--- Running Lint and Format Check ---"
ruff check src/ tests/
ruff format --check src/ tests/
echo "--- Running Tests with Coverage ---"
coverage run -m unittest discover tests
# Load report
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true