| # Copyright (c) 2023 Intel Corporation. |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| name: Twister BlackBox TestSuite |
| |
| on: |
| pull_request: |
| branches: |
| - main |
| - collab-* |
| - v*-branch |
| paths: |
| - 'scripts/pylib/twister/**' |
| - 'scripts/twister' |
| - 'scripts/tests/twister_blackbox/**' |
| - '.github/workflows/twister_tests_blackbox.yml' |
| |
| permissions: |
| contents: read |
| |
| env: |
| PYTHONIOENCODING: utf-8 |
| |
| concurrency: |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} |
| cancel-in-progress: true |
| |
| jobs: |
| twister-tests: |
| name: Twister Black Box Tests |
| strategy: |
| matrix: |
| python-version: ['3.12', '3.13'] |
| fail-fast: false |
| runs-on: ubuntu-24.04 |
| timeout-minutes: 120 |
| steps: |
| - name: Checkout |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| persist-credentials: false |
| path: zephyr |
| fetch-depth: 0 |
| |
| - name: Set Up Python ${{ matrix.python-version }} |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 |
| with: |
| python-version: ${{ matrix.python-version }} |
| cache: pip |
| cache-dependency-path: scripts/requirements-actions.txt |
| |
| - name: Setup Zephyr project |
| uses: zephyrproject-rtos/action-zephyr-setup@be8136a8bba01580485d98b7ad2d32477c36a49a # v1.0.15 |
| with: |
| app-path: zephyr |
| toolchains: 'arm-zephyr-eabi:riscv64-zephyr-elf:x86_64-zephyr-elf' |
| enable-ccache: false |
| west-group-filter: -tools,-bootloader,-babblesim,-hal |
| west-project-filter: -nrf_hw_models,+cmsis,+hal_xtensa,+cmsis_6 |
| |
| - name: Run Pytest For Twister Black Box Tests |
| working-directory: zephyr |
| shell: bash |
| env: |
| ZEPHYR_BASE: ./ |
| ZEPHYR_TOOLCHAIN_VARIANT: zephyr |
| run: | |
| export ZEPHYR_SDK_INSTALL_DIR=${{ github.workspace }}/zephyr-sdk |
| sudo apt-get install -y lcov |
| echo "Run twister tests" |
| source zephyr-env.sh |
| PYTHONPATH="./scripts/tests" pytest ./scripts/tests/twister_blackbox/ |