kadarakos's picture
fix: switch to make
8d13bac
name: CI Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: '3.12'
- name: Install dependencies
run: uv sync --all-extras --dev
# -----------------------------
# Run Makefile Targets
# -----------------------------
- name: Quality Checks
run: |
make lint
make format-check
make type-check
- name: Run Tests
run: make test
# -----------------------------
# Coverage & Tagging
# -----------------------------
- name: Extract & Tag Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Still using uv run here to ensure coverage tool is found
TOTAL_COV=$(uv run coverage report | grep TOTAL | awk '{print int($4)}')
echo "TOTAL_COV=$TOTAL_COV" >> $GITHUB_ENV
git config user.name "github-actions"
git config user.email "github-actions@github.com"
TAG_NAME="coverage-${TOTAL_COV}%"
if ! git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
git tag -a "$TAG_NAME" -m "Coverage $TOTAL_COV%"
git push origin "$TAG_NAME"
else
echo "Tag $TAG_NAME already exists, skipping"
fi