| # Copyright (c) 2020 Linaro Limited. |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| name: Zephyr West Command Tests |
| |
| on: |
| push: |
| branches: |
| - main |
| - v*-branch |
| - collab-* |
| paths: |
| - 'scripts/west-commands.yml' |
| - 'scripts/west_commands/**' |
| - 'scripts/requirements*' |
| - '.github/workflows/west_cmds.yml' |
| pull_request: |
| branches: |
| - main |
| - v*-branch |
| - collab-* |
| paths: |
| - 'scripts/west-commands.yml' |
| - 'scripts/west_commands/**' |
| - 'scripts/requirements*' |
| - '.github/workflows/west_cmds.yml' |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| west-commands: |
| name: West Command Tests |
| runs-on: ${{ matrix.os }} |
| strategy: |
| matrix: |
| python-version: ['3.12', '3.13'] |
| os: [ubuntu-24.04, macos-14, windows-2025] |
| steps: |
| - name: checkout |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| |
| - name: Set up Python ${{ matrix.python-version }} |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| with: |
| python-version: ${{ matrix.python-version }} |
| cache: pip |
| cache-dependency-path: scripts/requirements-actions.txt |
| |
| - name: Install Python packages |
| run: | |
| pip install -r scripts/requirements-actions.txt --require-hashes |
| |
| - name: run pytest-win |
| if: runner.os == 'Windows' |
| run: | |
| python ./scripts/west_commands/run_tests.py |
| |
| - name: run pytest-mac-linux |
| if: runner.os != 'Windows' |
| run: | |
| ./scripts/west_commands/run_tests.py |