Skip to content

Target tests

Target tests #34

Workflow file for this run

name: Target tests
on:
workflow_call:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
build:
uses: ./.github/workflows/build.yml
test:
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: 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 --break-system-packages
- name: Run tests
working-directory: thingy91x-oob/tests/on_target
run: |
pytest -v tests --firmware-hex artifacts/hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-debug-app.hex