Skip to content

test a specific runner #4

test a specific runner

test a specific runner #4

name: ESP-IDF Hardware-in-the-Loop Tests
on:
workflow_call:
inputs:
hil_board:
required: true
type: string
idf_target:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository and Submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
architecture: 'x64'
- name: Build Test Firmware
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.1.1
target: ${{ inputs.idf_target }}
path: 'tests/hil/platform/esp-idf'
command: 'idf.py -D GOLIOTH_HIL_TEST=connection build'
- name: Save Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.hil_board }}-connection-esp-idf
path: tests/hil/platform/esp-idf/build/merged.bin
test:
needs: build
runs-on: [ is_active, "jons_orange_pi", has_${{ inputs.hil_board }}" ]

Check failure on line 41 in .github/workflows/hil_test_esp-idf.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/hil_test_esp-idf.yml

Invalid workflow file

You have an error in your yaml syntax on line 41
container:
image: golioth/golioth-hil-base:af8e4f5
volumes:
- /dev:/dev
- /home/golioth/credentials:/opt/credentials
options: --privileged
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python dependencies
run: |
pip install pytest pytest-timeout
pip install tests/hil/scripts/pytest-hil
pip install git+https://github.com/golioth/[email protected]
- name: Power Cycle USB Hub
run: /opt/golioth-scripts/power-cycle-usb-hub.sh
- name: Download build
uses: actions/download-artifact@v4
with:
name: ${{ inputs.hil_board }}-connection-esp-idf
path: .
- name: Run test
shell: bash
env:
hil_board: ${{ inputs.hil_board }}
run: |
source /opt/credentials/runner_env.sh
PORT_VAR=CI_${hil_board^^}_PORT
pytest --rootdir . tests/hil/tests/connection \
--board esp-idf \
--port ${!PORT_VAR} \
--fw-image merged.bin \
--api-key ${{ secrets.PROD_CI_PROJECT_API_KEY }} \
--wifi-ssid ${{ secrets[format('{0}_WIFI_SSID', runner.name)] }} \
--wifi-psk ${{ secrets[format('{0}_WIFI_PSK', runner.name)] }} \
--timeout=600