Update MacOS and Linux workflows

This commit is contained in:
Veronica Berglyd Olsen
2025-10-18 18:20:13 +02:00
parent 4aef01ef32
commit 7a9464c592
3 changed files with 43 additions and 25 deletions
+19 -14
View File
@@ -14,37 +14,42 @@ jobs:
testLinux:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Python Setup
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Packages (apt)
- name: Install System Packages
run: |
sudo apt update
sudo apt install qttools5-dev-tools
- name: Install UV and Python
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- name: Checkout Source
uses: actions/checkout@v5
- name: Install UV
uses: astral-sh/setup-uv@v6
- name: Sync UV
run: |
uv sync --no-dev --group test
- name: Run Build Commands
run: |
uv run --no-dev pkgutils.py qtlrelease
uv run --no-dev pkgutils.py sample
uv run --no-sync pkgutils.py qtlrelease
uv run --no-sync pkgutils.py sample
- name: Run Tests
run: |
export QT_QPA_PLATFORM=offscreen
uv run --no-dev --group test coverage run -m pytest -v --timeout=60
uv run --no-dev --group test coverage xml
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
+23 -11
View File
@@ -14,24 +14,36 @@ jobs:
testMac:
runs-on: macos-latest
steps:
- name: Python Setup
uses: actions/setup-python@v6
# - name: Python Setup
# uses: actions/setup-python@v6
# with:
# python-version: "3.13"
# architecture: x64
# - name: Install Packages (brew)
# run: |
# brew install enchant
- name: Install UV and Python
uses: astral-sh/setup-uv@v6
with:
python-version: "3.13"
architecture: x64
- name: Install Packages (brew)
run: |
brew install enchant
- name: Checkout Source
uses: actions/checkout@v5
- name: Install Dependencies (pip)
- name: Sync UV
run: |
pip install -U pyobjc -r requirements.txt -r tests/requirements.txt
uv sync --no-dev --group test --group macos
- name: Run Tests
run: |
export QT_QPA_PLATFORM=offscreen
python -m pytest -v --cov=novelwriter --timeout=60
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