|
15 | 15 | - 'scripts/tests/twister_blackbox/**' |
16 | 16 | - '.github/workflows/twister_tests_blackbox.yml' |
17 | 17 |
|
| 18 | +permissions: |
| 19 | + contents: read |
| 20 | + |
18 | 21 | jobs: |
19 | 22 | twister-tests: |
20 | 23 | name: Twister Black Box Tests |
21 | | - runs-on: ${{ matrix.os }} |
| 24 | + runs-on: ubuntu-24.04 |
22 | 25 | strategy: |
23 | 26 | matrix: |
24 | | - python-version: ['3.10', '3.11', '3.12'] |
25 | | - os: [ubuntu-22.04] |
26 | | - container: |
27 | | - image: ghcr.io/zephyrproject-rtos/ci:v0.26.18 |
28 | | - |
| 27 | + python-version: ['3.10', '3.11', '3.12', '3.13'] |
29 | 28 | steps: |
30 | | - - name: Apply Container Owner Mismatch Workaround |
31 | | - run: | |
32 | | - # FIXME: The owner UID of the GITHUB_WORKSPACE directory may not |
33 | | - # match the container user UID because of the way GitHub |
34 | | - # Actions runner is implemented. Remove this workaround when |
35 | | - # GitHub comes up with a fundamental fix for this problem. |
36 | | - git config --global --add safe.directory ${GITHUB_WORKSPACE} |
37 | | -
|
38 | 29 | - name: Checkout |
39 | 30 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
40 | | - |
41 | | - - name: Environment Setup |
42 | | - run: | |
43 | | - echo "$HOME/.local/bin" >> $GITHUB_PATH |
44 | | -
|
45 | | - west init -l . || true |
46 | | - west config manifest.group-filter -- -hal,-tools,-bootloader,-babblesim |
47 | | - west config manifest.project-filter -- -nrf_hw_models |
48 | | - west config --global update.narrow true |
49 | | - west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject) |
50 | | - west forall -c 'git reset --hard HEAD' |
51 | | -
|
52 | | - echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV |
| 31 | + with: |
| 32 | + path: zephyr |
| 33 | + fetch-depth: 0 |
53 | 34 |
|
54 | 35 | - name: Set Up Python ${{ matrix.python-version }} |
55 | 36 | uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 |
56 | 37 | with: |
57 | 38 | python-version: ${{ matrix.python-version }} |
| 39 | + cache: pip |
| 40 | + cache-dependency-path: scripts/requirements-actions.txt |
58 | 41 |
|
59 | | - - name: Go Into Venv |
60 | | - shell: bash |
| 42 | + - name: install-packages |
| 43 | + working-directory: zephyr |
61 | 44 | run: | |
62 | | - python3 -m pip install --user virtualenv |
63 | | - python3 -m venv env |
64 | | - source env/bin/activate |
65 | | - echo "$(which python)" |
| 45 | + pip install -r scripts/requirements-actions.txt --require-hashes |
| 46 | + sudo apt-get update -y |
| 47 | + sudo apt-get install -y lcov |
66 | 48 |
|
67 | | - - name: Install Packages |
68 | | - run: | |
69 | | - python3 -m pip install -U -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt -r scripts/requirements-run-test.txt |
| 49 | + - name: Setup Zephyr project |
| 50 | + uses: zephyrproject-rtos/action-zephyr-setup@f7b70269a8eb01f70c8e710891e4c94972a2f6b4 # v1.0.6 |
| 51 | + with: |
| 52 | + app-path: zephyr |
| 53 | + sdk-version: 0.16.9 |
| 54 | + toolchains: all |
70 | 55 |
|
71 | 56 | - name: Run Pytest For Twister Black Box Tests |
| 57 | + working-directory: zephyr |
72 | 58 | shell: bash |
73 | 59 | env: |
74 | 60 | ZEPHYR_BASE: ./ |
75 | 61 | ZEPHYR_TOOLCHAIN_VARIANT: zephyr |
76 | 62 | run: | |
| 63 | + export ZEPHYR_SDK_INSTALL_DIR=${{ github.workspace }}/zephyr-sdk |
77 | 64 | echo "Run twister tests" |
78 | 65 | source zephyr-env.sh |
79 | | - PYTHONPATH="./scripts/tests" pytest ./scripts/tests/twister_blackbox |
| 66 | + PYTHONPATH="./scripts/tests" pytest ./scripts/tests/twister_blackbox/ |
0 commit comments