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
This commit is contained in:
Tim Hadwen
2026-01-18 20:59:04 +10:00
parent 2477fd1539
commit b89456a7f7
4 changed files with 204 additions and 0 deletions

59
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
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 .