ci: flake8 on all python folders; Run pytest in CI
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m20s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Run pytests / Check-Pytest (push) Successful in 10s
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m20s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Run pytests / Check-Pytest (push) Successful in 10s
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
This commit is contained in:
@@ -25,8 +25,11 @@ jobs:
|
|||||||
path: git
|
path: git
|
||||||
- name: Check python
|
- name: Check python
|
||||||
run: |
|
run: |
|
||||||
cd git/software/src &&
|
cd git/software && (
|
||||||
find . -iname '*.py' -exec ../../../flake-venv/bin/flake8 {} +
|
find src -iname '*.py' -exec ../../flake-venv/bin/flake8 {} +
|
||||||
|
find tests -iname '*.py' -exec ../../flake-venv/bin/flake8 {} +
|
||||||
|
find modules -iname '*.py' -exec ../../flake-venv/bin/flake8 {} +
|
||||||
|
)
|
||||||
Check-Bash-Shellcheck:
|
Check-Bash-Shellcheck:
|
||||||
runs-on: ubuntu-22.04-full
|
runs-on: ubuntu-22.04-full
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
24
.gitea/workflows/unit-tests-python.yaml
Normal file
24
.gitea/workflows/unit-tests-python.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
# Copyright (c) 2025 Matthias Blankertz <matthias@blankertz.org>
|
||||||
|
---
|
||||||
|
name: Run pytests
|
||||||
|
"on":
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Check-Pytest:
|
||||||
|
runs-on: ubuntu-22.04-full
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: git
|
||||||
|
- name: Get dependencies
|
||||||
|
run: |
|
||||||
|
python -m venv test-venv
|
||||||
|
test-venv/bin/pip install -r git/software/tests/requirements.txt
|
||||||
|
- name: Run pytest
|
||||||
|
run: |
|
||||||
|
. test-venv/bin/activate &&
|
||||||
|
cd git/software &&
|
||||||
|
pytest
|
||||||
Reference in New Issue
Block a user