1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
name: CI
on:
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
unit-test:
continue-on-error: ${{ github.repository == 'proxmoxer/proxmoxer' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
# - "3.14"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache PIP packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-python${{ matrix.python-version }}-${{ hashFiles('*requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-python${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install pip Packages
run: pip install -r test_requirements.txt
- name: Install Self as Package
run: pip install .
- name: Run Tests
run: pytest -v --cov tests/
- name: Run pre-commit lint/format checks
uses: pre-commit/action@v3.0.1
- name: Upload coverage data to coveralls.io
if: github.repository == 'proxmoxer/proxmoxer'
run: coveralls --service=github-actions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_FLAG_NAME: Unit Test (${{ matrix.python-version }})
COVERALLS_PARALLEL: true
complete:
name: Finalize Coveralls Report
if: github.repository == 'proxmoxer/proxmoxer'
needs: unit-test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2.3.4
with:
parallel-finished: true
github-token: ${{ secrets.GITHUB_TOKEN }}
|