Files
python/.github/workflows/ci.yml
geeksville 9e319f3c52 update CI scripts to allow running CI on the desktop (see below)
* add script to run 'act' local github actions tool (lets devs check github
actions on their local machine)
* Update various github actions to latest (so they can work with the 'act'
tool)
* change a few places where python version was not properly quoted as a
string (act yaml parser is more strict than the github version)
* update pylint min-version to work with recent github actions
* remove pandas/riden requirement (that's in my other branch for now)
2024-06-22 08:02:33 -07:00

73 lines
1.9 KiB
YAML

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v5
- name: Uninstall meshtastic
run: |
pip3 uninstall -y meshtastic
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install poetry
- name: Install meshtastic from local
run: |
poetry install
poetry run meshtastic --version
- name: Run pylint
run: poetry run pylint meshtastic examples/ --ignore-patterns ".*_pb2.pyi?$"
- name: Check types with mypy
run: poetry run mypy meshtastic/
- name: Run tests with pytest
run: poetry run pytest --cov=meshtastic
- name: Generate coverage report
run: |
poetry run pytest --cov=meshtastic --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS, PYTHON
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
validate:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v5
- name: Install meshtastic from local
run: |
python -m pip install --upgrade pip
pip3 install poetry
poetry install
poetry run meshtastic --version