Files
inventree-rma-plugin/.github/workflows/ci.yml
Tim Hadwen b89456a7f7 Add CI workflow and contribution guidelines
- GitHub Actions workflow for testing on Python 3.9-3.12
- Ruff linting in CI
- Coverage reporting to Codecov
- CONTRIBUTING.md with development setup instructions
- LICENSE file (MIT)
- Dev dependencies in pyproject.toml
2026-01-18 20:59:04 +10:00

60 lines
1.3 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install -e .
- name: Run tests
run: |
python -m pytest tests/ -v --cov=inventree_rma_plugin --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: matrix.python-version == '3.11'
with:
files: ./coverage.xml
fail_ci_if_error: false
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install linters
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run ruff
run: |
ruff check --output-format=github .