From 40363068e378759d1b00c5df54ec541c31daa80c Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 18 Oct 2025 18:51:55 +0200 Subject: [PATCH] Update Windows workflow and try to fix MacOS --- .github/workflows/test_mac.yml | 2 +- .github/workflows/test_win.yml | 26 ++++++++++++++++---------- pyproject.toml | 4 +--- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test_mac.yml b/.github/workflows/test_mac.yml index 5d24b3c9..c88348db 100644 --- a/.github/workflows/test_mac.yml +++ b/.github/workflows/test_mac.yml @@ -24,7 +24,7 @@ jobs: - name: Sync UV run: | - uv sync --no-dev --group test --group macos + uv sync --no-dev --group test --group macos --python-platform x86_64-apple-darwin - name: Run Tests run: | diff --git a/.github/workflows/test_win.yml b/.github/workflows/test_win.yml index 1cdca205..4f6ad739 100644 --- a/.github/workflows/test_win.yml +++ b/.github/workflows/test_win.yml @@ -14,20 +14,26 @@ jobs: testWin: runs-on: windows-latest steps: - - name: Python Setup - uses: actions/setup-python@v6 - with: - python-version: "3.13" - architecture: x64 - name: Checkout Source uses: actions/checkout@v5 - - name: Install Dependencies (pip) + + - name: Install UV and Python + uses: astral-sh/setup-uv@v6 + with: + python-version: "3.13" + + - name: Sync UV run: | - pip install -U -r requirements.txt -r tests/requirements.txt + uv sync --no-dev --group test + - name: Run Tests run: | - python -m pytest -v --cov=novelwriter --timeout=60 + $env:QT_QPA_PLATFORM=offscreen + uv run --no-sync coverage run -m pytest -v --timeout=60 + uv run --no-sync coverage xml + - name: Upload to Codecov uses: codecov/codecov-action@v5 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true diff --git a/pyproject.toml b/pyproject.toml index 2160eefe..945e8028 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,12 +29,10 @@ dynamic = ["version"] [dependency-groups] dev = [ - { include-group = "build" }, { include-group = "docs" }, { include-group = "test" }, { include-group = "lint" }, ] -build = ["setuptools>=77.0.3"] docs = [ "docutils>=0.17.1", "pygments>=2.7", @@ -47,7 +45,7 @@ docs = [ ] test = ["coverage>=7.2.0", "pytest-qt", "pytest-timeout", "pytest>=6.0.0"] lint = ["isort", "pyright", "ruff"] -macos = ["pyobjc", { include-group = "build" }] +macos = ["pyobjc"] [project.urls] Homepage = "https://novelwriter.io"