ci: simplify to single Linux/Python 3.12 job
CI / Tests (Linux, Python 3.12) (push) Successful in 9m27s
CI / Tests (Linux, Python 3.12) (push) Successful in 9m27s
Gitea only has Linux runners available. Drop the Python version matrix, macOS/Windows jobs, and coverage artifact upload to reduce CI surface area to what can actually run.
This commit is contained in:
+5
-58
@@ -7,21 +7,17 @@ on:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test-linux:
|
||||
name: Tests (Linux, Python ${{ matrix.python-version }})
|
||||
test:
|
||||
name: Tests (Linux, Python 3.12)
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.9", "3.11", "3.12"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
python-version: "3.12"
|
||||
cache: pip
|
||||
cache-dependency-path: |
|
||||
requirements.txt
|
||||
@@ -42,54 +38,5 @@ jobs:
|
||||
python tagsync.py --help
|
||||
python tagsync.py status
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: |
|
||||
pytest --cov=tagsync --cov-report=term-missing --cov-report=xml
|
||||
|
||||
- name: Upload coverage artifact
|
||||
if: matrix.python-version == '3.12'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage-xml
|
||||
path: coverage.xml
|
||||
retention-days: 14
|
||||
|
||||
test-macos:
|
||||
name: Tests (macOS)
|
||||
runs-on: macos-latest
|
||||
# macOS runners are more expensive — only run on main-branch pushes
|
||||
# and PRs that touch platform_macos.py or core logic.
|
||||
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'platform')
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements-dev.txt
|
||||
|
||||
- name: Run tests
|
||||
run: pytest -v
|
||||
|
||||
test-windows:
|
||||
name: Tests (Windows)
|
||||
runs-on: windows-latest
|
||||
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'platform')
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements-dev.txt
|
||||
|
||||
- name: Run tests
|
||||
run: pytest -v
|
||||
run: pytest
|
||||
|
||||
Reference in New Issue
Block a user