Skip to content

Commit c2d2812

Browse files
committed
workflow: Add minimal Zephyr unit tests workflow for SOF CI
This commit introduces a basic GitHub Actions workflow to establish the foundation for running SOF unit tests that have been ported from cmocka to Zephyr ztest framework. The workflow currently includes: - Basic checkout step with proper fetch depth and tree filtering - West initialization and workspace setup - Environment verification step for debugging This is the first iteration of the workflow, designed to validate the basic environment setup before implementing the full test execution pipeline. The workflow will be expanded in subsequent commits to include: - Zephyr SDK installation - Complete environment configuration - Unit test compilation and execution using west twister - Test result collection and reporting Testing approach: - Triggers only on pull requests for safe testing - Minimal resource usage during initial validation - Debug output to verify workspace structure The workflow follows SOF CI patterns and prepares the groundwork for integrating ztest unit tests into the continuous integration pipeline. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
1 parent 56d907a commit c2d2812

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Unit Tests (Zephyr ztest)"
2+
on: [pull_request]
3+
branches:
4+
- 'main'
5+
6+
permissions:
7+
contents: read
8+
9+
# Specifies group name that stops previous workflows if the name matches
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
sof-ci-unit-tests:
16+
name: SOF CI Unit Tests
17+
runs-on: ubuntu-22.04
18+
timeout-minutes: 10
19+
20+
steps:
21+
- name: Checkout SOF repository
22+
uses: actions/checkout@v4
23+
with:
24+
path: ./workspace/sof
25+
fetch-depth: 2
26+
filter: 'tree:0'
27+
28+
- name: west update
29+
run: |
30+
cd workspace/sof
31+
pip3 install west
32+
west init -l
33+
west update --narrow --fetch-opt=--filter=tree:0
34+
35+
- name: Test step
36+
run: |
37+
echo "pwd: $(pwd)"
38+
echo "ls -l:"
39+
ls -l
40+
echo "End"

0 commit comments

Comments
 (0)