diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml new file mode 100644 index 000000000000..6dbc8abd891b --- /dev/null +++ b/.github/workflows/scripts-test.yml @@ -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 diff --git a/scripts/requirements-test.txt b/scripts/requirements-test.txt new file mode 100644 index 000000000000..f59168095eb9 --- /dev/null +++ b/scripts/requirements-test.txt @@ -0,0 +1,5 @@ +# packages required to run tests for Python scripts +cryptography +ecdsa +intelhex +pytest