Fix syntax in CI pipeline branch specification #3
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 Pipeline | ||
on: | ||
push: | ||
branches: "*" | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
lint: | ||
name: Lint & Format Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python 3.13 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.13" | ||
- name: Install uv | ||
run: curl -LsSf https://astral.sh/uv/install.sh | sh | ||
# Add uv to the PATH | ||
- name: Add uv to PATH | ||
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
- name: Install dependencies (including dev) | ||
run: uv pip install --system -e '.[test,dev]' # Need dev for ruff | ||
- name: Lint with Ruff | ||
run: uv run ruff check . | ||
- name: Check formatting with Ruff | ||
run: uv run ruff format --check . | ||
test: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
needs: lint # Ensure linting passes before testing | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python 3.13 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.13" | ||
- name: Install uv | ||
run: curl -LsSf https://astral.sh/uv/install.sh | sh | ||
# Add uv to the PATH | ||
- name: Add uv to PATH | ||
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
- name: Install dependencies (including test) | ||
run: uv pip install --system . | ||
- name: Run tests with pytest | ||
run: uv run pytest -v |