mirror of
https://github.com/AkitaEngineering/Akita-Meshtastic-Meshcore-Bridge.git
synced 2026-10-31 01:42:01 +01:00
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
# .github/workflows/python-ci.yml
|
|
# Lint, type-check, and test the AMMB project.
|
|
|
|
name: Python CI for AMMB
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build_and_test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
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 -r requirements-dev.txt
|
|
|
|
- name: Lint with flake8
|
|
run: |
|
|
flake8 ammb tests run_bridge.py run_bridge_async.py run_bridge_tui.py --select=E9,F63,F7,F82 --show-source --statistics
|
|
flake8 ammb tests run_bridge.py run_bridge_async.py run_bridge_tui.py
|
|
|
|
- name: Type check with mypy
|
|
run: |
|
|
mypy ammb run_bridge.py run_bridge_async.py run_bridge_tui.py
|
|
|
|
- name: Test with pytest
|
|
run: |
|
|
pytest --cov=ammb --cov-report=term-missing --cov-report=xml
|
|
|
|
- name: Audit runtime dependencies
|
|
if: matrix.python-version == '3.12'
|
|
run: pip-audit -r requirements.txt
|
|
|
|
- name: Build and validate release artifacts
|
|
if: matrix.python-version == '3.12'
|
|
run: |
|
|
python -m build
|
|
twine check dist/*
|