Skip to content

Target tests

Target tests #6

Workflow file for this run

name: On_target
on:
workflow_dispatch:
inputs:
run_test:
description: 'Run test stage'
required: false
default: 'yes'
type: select
options:
- yes
- no
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
build:
name: Build
runs-on: ubuntu-22.04
container: ghcr.io/zephyrproject-rtos/ci:v0.26.12
env:
CMAKE_PREFIX_PATH: /opt/toolchains
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: thingy91x-oob
- name: Initialize
working-directory: thingy91x-oob
run: |
west init -l .
west config manifest.group-filter +bsec
west update -o=--depth=1 -n
- name: Install dependencies
run: |
pip install -r nrf/scripts/requirements-build.txt
- name: Build firmware
working-directory: thingy91x-oob
run: |
west build -b thingy91x/nrf9151/ns app -p -- -DCONFIG_NRF_CLOUD_CLIENT_ID_PREFIX=\"oob-\" -DCONFIG_NRF_CLOUD_SEC_TAG=4242
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: oob-t91x-hex
path: thingy91x-oob/build/zephyr/merged.hex
test:
if: github.event.inputs.run_test == 'yes' || github.event.inputs.run_test == '' || github.event.inputs.run_test == null
name: Test
needs: build
runs-on: self-hosted
container:
image: ghcr.io/dematteisgiacomo/ubuntu-jlink-nrfutil:latest
options: --privileged
volumes:
- /dev:/dev:rw
- /run/udev:/run/udev
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: thingy91x-oob
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: oob-t91x-hex
path: thingy91x-oob/tests/on_target/artifacts
- name: Verify artifact path
working-directory: thingy91x-oob
run: |
ls -l tests/on_target/artifacts
- name: Run tests
working-directory: thingy91x-oob
run: |
./tests/on_target/run-tests.sh