Skip to content

Commit 24f9879

Browse files
fundakolnvlsianpu
authored andcommitted
scripts: Add new workflow file to Github Actions to run pytest
Run tests from scripts/bootloader/tests with pytest each time when Python scripts are modified. Signed-off-by: Lukasz Fundakowski <[email protected]>
1 parent d3f8f0f commit 24f9879

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/scripts-test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Python scripts tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- 'scripts/bootloader/**'
9+
10+
jobs:
11+
test-scripts:
12+
name: Run tests for python scripts
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest]
17+
python-version: ['3.10', '3.11', '3.12', '3.13']
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Setup Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install packages
26+
run: python -m pip install -r scripts/requirements-test.txt
27+
- name: Run tests
28+
run: python -m pytest scripts/bootloader/tests

scripts/requirements-test.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# packages required to run tests for Python scripts
2+
cryptography
3+
ecdsa
4+
intelhex
5+
pytest

0 commit comments

Comments
 (0)