Update MacOS and Linux workflows
This commit is contained in:
@@ -14,37 +14,42 @@ jobs:
|
|||||||
testLinux:
|
testLinux:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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
|
fail-fast: false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Python Setup
|
- name: Install System Packages
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
architecture: x64
|
|
||||||
|
|
||||||
- name: Install Packages (apt)
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install qttools5-dev-tools
|
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
|
- name: Checkout Source
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install UV
|
- name: Sync UV
|
||||||
uses: astral-sh/setup-uv@v6
|
run: |
|
||||||
|
uv sync --no-dev --group test
|
||||||
|
|
||||||
- name: Run Build Commands
|
- name: Run Build Commands
|
||||||
run: |
|
run: |
|
||||||
uv run --no-dev pkgutils.py qtlrelease
|
uv run --no-sync pkgutils.py qtlrelease
|
||||||
uv run --no-dev pkgutils.py sample
|
uv run --no-sync pkgutils.py sample
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
export QT_QPA_PLATFORM=offscreen
|
export QT_QPA_PLATFORM=offscreen
|
||||||
uv run --no-dev --group test coverage run -m pytest -v --timeout=60
|
uv run --no-sync coverage run -m pytest -v --timeout=60
|
||||||
uv run --no-dev --group test coverage xml
|
uv run --no-sync coverage xml
|
||||||
|
|
||||||
- name: Upload to Codecov
|
- name: Upload to Codecov
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
|
|||||||
@@ -14,24 +14,36 @@ jobs:
|
|||||||
testMac:
|
testMac:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Python Setup
|
# - name: Python Setup
|
||||||
uses: actions/setup-python@v6
|
# 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:
|
with:
|
||||||
python-version: "3.13"
|
python-version: "3.13"
|
||||||
architecture: x64
|
|
||||||
- name: Install Packages (brew)
|
|
||||||
run: |
|
|
||||||
brew install enchant
|
|
||||||
- name: Checkout Source
|
- name: Checkout Source
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
- name: Install Dependencies (pip)
|
|
||||||
|
- name: Sync UV
|
||||||
run: |
|
run: |
|
||||||
pip install -U pyobjc -r requirements.txt -r tests/requirements.txt
|
uv sync --no-dev --group test --group macos
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
export QT_QPA_PLATFORM=offscreen
|
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
|
- name: Upload to Codecov
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
env:
|
with:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
fail_ci_if_error: true
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ docs = [
|
|||||||
]
|
]
|
||||||
test = ["coverage>=7.2.0", "pytest-qt", "pytest-timeout", "pytest>=6.0.0"]
|
test = ["coverage>=7.2.0", "pytest-qt", "pytest-timeout", "pytest>=6.0.0"]
|
||||||
lint = ["isort", "pyright", "ruff"]
|
lint = ["isort", "pyright", "ruff"]
|
||||||
|
macos = ["pyobjc"]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://novelwriter.io"
|
Homepage = "https://novelwriter.io"
|
||||||
|
|||||||
Reference in New Issue
Block a user