Skip to content

Target tests

Target tests #27

Workflow file for this run

name: On_target
on:
workflow_call:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
build:
uses: ./.github/workflows/build.yml
test:
if: github.event.inputs.run_test == 'yes' || github.event.inputs.run_test == '' || github.event.inputs.run_test == null
name: build
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: firmware
path: thingy91x-oob/tests/on_target/artifacts
- name: Set version
shell: bash
run: |
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV
fi
- name: Verify artifact path
working-directory: thingy91x-oob
run: |
ls -l tests/on_target/artifacts
- name: Install dependencies
working-directory: thingy91x-oob/tests/on_target
run: |
pip install -r requirements.txt
- name: Run tests
working-directory: thingy91x-oob/tests/on_target
run: |
pytest -v --firmware-hex tests/on_target/artifacts/hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-debug-app.hex