Skip to content

test: main#aa6fabf91947f2cf2fbb90271a2559336c44aacf #143

test: main#aa6fabf91947f2cf2fbb90271a2559336c44aacf

test: main#aa6fabf91947f2cf2fbb90271a2559336c44aacf #143

Workflow file for this run

# YAML -*- mode: yaml; tab-width: 2; indent-tabs-mode: nil; coding: utf-8 -*-
# SPDX-License-Identifier: Zlib
# SPDX-FileCopyrightText: Silicon Laboratories Inc. https://www.silabs.com
---
name: test
# yamllint disable-line rule:line-length
run-name: "test: ${{ github.event.workflow_run.head_branch }}#${{ github.event.workflow_run.head_commit.id }}"
on: # yamllint disable-line rule:truthy
workflow_run:
workflows: ["build"]
types:
- completed
jobs:
test:
permissions:
contents: read
statuses: write
env:
project-name: z-wave-protocol-controller # Align to docker (lowercase)
runs-on: ubuntu-24.04
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download image
id: image
# yamllint disable-line rule:line-length
uses: ishworkh/container-image-artifact-download@d5e9b6d62ef3f9762f6553c8178c2d925acc0409 # v2.1.0
with:
image: "${{ env.project-name }}:latest"
workflow: "build"
token: ${{ secrets.GH_SL_ACCESS_TOKEN }}
workflow_run_id: ${{ github.event.workflow_run.id }}
download_tmp_dir: ${{ runner.temp }}
- name: Check and remove downloaded artifact
# yamllint disable rule:line-length
env:
file: ${{ steps.image.outputs.download_path }}
run: |
set -xe
echo "Info for comparing to build artifacts"
sha256sum "${{env.file}}"
tar -xOf "${{env.file}}" manifest.json | jq
rm -rfv "${{env.file}}"
echo "TODO: https://docs.docker.com/engine/security/trust/"
# yamllint enable rule:line-length
- name: Download embedded applications package
# yamllint disable-line rule:line-length
uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 # v1.12
with:
repository: 'Z-Wave-Alliance/z-wave-stack-binaries'
tag: 'v25.1.0-28-g7e0b50f'
fileName: 'z-wave-stack-binaries-*-Linux.tar.gz'
token: ${{ secrets.GH_ZWAVE_ACCESS_TOKEN }}
latest: true
- name: Setup
env:
debian_packages: time screen docker-compose mosquitto-clients jq wget
run: >-
set -x
&& sudo apt update
&& sudo apt install -y --no-install-recommends
${{ env.debian_packages }}
&& sudo apt-get clean -y
&& echo "https://github.com/Z-Wave-Alliance/z-wave-stack/issues/733"
&& mkdir -p ${{ runner.temp }}/z-wave-stack-binaries
&& tar xfz z-wave-stack-binaries-*-Linux.tar.gz
-C ${{ runner.temp }}/z-wave-stack-binaries
&& rm z-wave-stack-binaries-*-Linux.tar.gz
&& date -u
- name: Download tests artifacts
id: tests
# yamllint disable-line rule:line-length
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ github.event.repository.name }}-tests
github-token: ${{ secrets.GH_SL_ACCESS_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
path: ${{ runner.temp }}
- name: Run
id: run
working-directory: ${{ runner.temp }}
env:
file: ${{ runner.temp }}/scripts/tests/z-wave-stack-binaries-test.sh
# yamllint disable rule:line-length
run: |
set -x
export ZPC_RUN_MODE="docker"
export ZPC_COMMAND="docker run ${{ env.project-name }}"
$ZPC_COMMAND --version
docker-compose pull
export ZPC_COMMAND="docker-compose up --abort-on-container-exit"
export z_wave_stack_binaries_bin_dir="${{ runner.temp }}/z-wave-stack-binaries/bin"
export ZPC_ARGS="--log.level=d"
chmod u+rx ${{ env.file }}
${{ env.file }}
# yamllint enable rule:line-length
continue-on-error: true
- name: Propagate status on fail
# yamllint disable-line rule:line-length
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: always()
env:
status: ${{ steps.run.outcome }}
sha: ${{ github.event.workflow_run.head_commit.id }}
with:
script: |
if (process.env.status != 'success') {
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: process.env.sha,
state: 'failure'
})
core.setFailed(`Status: ${process.env.status}`);
process.exit(1);
}