| # 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/**' |
| - '.github/workflows/west_cmds.yml' |
| pull_request: |
| branches: |
| - main |
| - v*-branch |
| - collab-* |
| paths: |
| - 'scripts/west-commands.yml' |
| - 'scripts/west_commands/**' |
| - '.github/workflows/west_cmds.yml' |
| |
| permissions: |
| contents: read |
| |
| jobs: |
| west-commands: |
| name: West Command Tests |
| runs-on: ${{ matrix.os }} |
| strategy: |
| matrix: |
| python-version: ['3.10', '3.11', '3.12', '3.13'] |
| os: [ubuntu-22.04, macos-14, windows-2022] |
| steps: |
| - name: checkout |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| |
| - name: Set up Python ${{ matrix.python-version }} |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.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 |