Target tests #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Target tests | |
on: | |
workflow_call: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
with: | |
build_bl_update: true | |
test: | |
name: Test | |
needs: build | |
runs-on: self-hosted | |
environment: production | |
container: | |
image: ghcr.io/dematteisgiacomo/ubuntu-jlink-nrfutil:latest | |
options: --privileged | |
volumes: | |
- /dev:/dev:rw | |
- /run/udev:/run/udev | |
- /opt/setup-jlink:/opt/setup-jlink | |
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 UART output tests | |
working-directory: thingy91x-oob/tests/on_target | |
run: | | |
pytest -s -v -m dut1 tests --firmware-hex artifacts/hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-debug-app.hex | |
env: | |
SEGGER: ${{ secrets.SEGGER_DUT_1 }} | |
- name: Run DFU tests | |
working-directory: thingy91x-oob/tests/on_target | |
run: | | |
pytest -s -v -m dut2 tests | |
python3 ../../scripts/thingy91x_dfu.py --check-nrf53-version --serial THINGY91X_${{ secrets.UART_DUT_2 }} 2>&1 >/dev/null | grep "S1: 2" | |
env: | |
SEGGER_NRF53: ${{ secrets.SEGGER_DUT_2_EXT_DBG }} | |
SEGGER_NRF91: ${{ secrets.SEGGER_DUT_2_NRF91 }} | |
UART_ID: ${{ secrets.UART_DUT_2 }} | |
NRF53_HEX_FILE: artifacts/hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-nrf53-connectivity-bridge.hex | |
NRF53_APP_UPDATE_ZIP: artifacts/hello.nrfcloud.com-${{ env.VERSION }}-nrf53-connectivity-bridge-verbose.zip | |
NRF53_BL_UPDATE_ZIP: artifacts/hello.nrfcloud.com-${{ env.VERSION }}-nrf53-bootloader.zip | |
NRF91_HEX_FILE: artifacts/hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-bootloader.hex | |
NRF91_APP_UPDATE_ZIP: artifacts/hello.nrfcloud.com-${{ env.VERSION }}-thingy91x-nrf91-dfu.zip | |
NRF91_BL_UPDATE_ZIP: artifacts/hello.nrfcloud.com-${{ env.VERSION }}-nrf91-bootloader.zip |