Skip to content

Commit

Permalink
👷 use uv venv in ci, add python 3.12 to testing matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
krmax44 committed Sep 16, 2024
1 parent d3270f3 commit e28d4a5
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
env:
UV_CACHE_DIR: /tmp/.uv-cache
UV_SYSTEM_PYTHON: true
python-version: ['3.10', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Setup uv
uses: astral-sh/setup-uv@v2
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: |
uv.lock
pyproject.toml
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
Expand All @@ -41,26 +42,19 @@ jobs:
cache: 'pnpm'
- name: Install system-level dependencies
run: sudo apt-get update && sudo apt-get install python3-dev libmagic-dev libmagickwand-dev poppler-utils libpoppler-cpp-dev
- name: uv cache
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('requirements-dev.txt') }}
uv-${{ runner.os }}
- name: Setup venv
run: |
uv venv --python ${{ matrix.python-version }}
source .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Install dependencies
run: |
python -m pip install uv
uv pip install ".[test]"
uv sync --extra test --frozen
uv pip install -e . --no-deps
pnpm install
- name: Build frontend
run: pnpm run build
- name: Run tests
run: |
coverage run --branch -m pytest -m "not slow"
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
- name: Show coverage report
run: coverage report
- name: Minimize uv cache
run: uv cache prune --ci

0 comments on commit e28d4a5

Please sign in to comment.