From 8f708031a2eb969e679b9d917e2da3d2d9cc10ae Mon Sep 17 00:00:00 2001 From: Jsakkos Date: Tue, 24 Dec 2024 13:30:27 -0800 Subject: [PATCH] Update GitHub Actions workflow to support Python 3.12 and improve setup steps --- .github/workflows/tests.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 99bb0fe..a243912 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,30 +11,29 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: + - "3.9" + - "3.10" + - "3.11" + - "3.12" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - name: Install uv and set the python version + uses: astral-sh/setup-uv@v4 with: python-version: ${{ matrix.python-version }} - - name: Install UV - run: | - python -m pip install --upgrade pip - pip install uv - - name: Install dependencies run: | uv venv - uv pip install ".[dev]" - uv pip install pytest pytest-cov + uv pip install -e ".[dev]" + uv tool install pytest pytest-cov - name: Run tests with pytest and coverage run: | - pytest tests/ --cov=lr_autotag --cov-report=xml + uv tool run pytest tests/ --cov=lr_autotag --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v3