From 6b29a70aead4a69c11a245f4df4a52330ea97224 Mon Sep 17 00:00:00 2001 From: Wouter de Bruijn Date: Mon, 2 Feb 2026 18:48:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Updated=20action=20to=20use=20uv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/run_tests.yml | 41 +++++++++++++++------------------ 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 589fc47..654d003 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,32 +1,27 @@ --- -name: Pytest code testing +name: Tests on: pull_request: workflow_call: jobs: - test_code: + test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12", "3.13"] steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pytest pytest-mock coverage pytest-cov - pip install -r requirements.txt - - name: Testing the code with PyTest - run: | - cp config.py.example config.py - pytest tests - - name: Run tests with coverage - run: | - cp config.py.example config.py - coverage run -m pytest tests - - name: Check coverage percentage - run: | - coverage report --fail-under=70 + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + - name: Set up Python ${{ matrix.python-version }} + run: uv python install ${{ matrix.python-version }} + - name: Install dependencies + run: uv sync --dev + - name: Copy example config + run: cp config.py.example config.py + - name: Run tests with coverage + run: uv run pytest tests --cov --cov-report=term --cov-fail-under=70