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]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-linux:
|
test:
|
||||||
name: Tests (Linux, Python ${{ matrix.python-version }})
|
name: Tests (Linux, Python 3.12)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
python-version: ["3.9", "3.11", "3.12"]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: "3.12"
|
||||||
cache: pip
|
cache: pip
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
requirements.txt
|
requirements.txt
|
||||||
@@ -42,54 +38,5 @@ jobs:
|
|||||||
python tagsync.py --help
|
python tagsync.py --help
|
||||||
python tagsync.py status
|
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
|
- name: Run tests
|
||||||
run: pytest -v
|
run: pytest
|
||||||
|
|
||||||
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user