Skip to content

Commit

Permalink
scripts: Add new workflow file to Github Actions to run pytest
Browse files Browse the repository at this point in the history
Run tests from scripts/bootloader/tests with pytest
each time when Python scripts are modified.

Signed-off-by: Lukasz Fundakowski <[email protected]>
  • Loading branch information
fundakol committed Dec 5, 2024
1 parent c469cb6 commit 19e1af4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/scripts-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Python scripts tests

on:
pull_request:
branches:
- main
paths:
- 'scripts/bootloader/**'

jobs:
test-scripts:
name: Run tests for python scripts
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10', '3.11', '3.12', '3.13']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
run: python -m pip install -r scripts/requirements-test.txt
- name: Run tests
run: python -m pytest scripts/bootloader/tests
5 changes: 5 additions & 0 deletions scripts/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# packages required to run tests for Python scripts
cryptography
ecdsa
intelhex
pytest

0 comments on commit 19e1af4

Please sign in to comment.