Skip to content

Commit

Permalink
test config_json files
Browse files Browse the repository at this point in the history
Signed-off-by: SGudla <[email protected]>
  • Loading branch information
SaikiranGudla committed Nov 26, 2024
1 parent 2b5cbf6 commit 0575013
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/build-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ jobs:
# name: ${{ matrix.project }}
# path: ./build

- name: Read configuration from JSON
id: config
shell: bash
run: |
config=$(jq -r '.${{ matrix.project }}' config.json)
echo "::set-output name=serialport::$(echo $config | jq -r '.serialport')"
echo "::set-output name=device_name::$(echo $config | jq -r '.device_name')"
echo "::set-output name=platform_name::$(echo $config | jq -r '.platform_name')"
echo "::set-output name=serial_com_type::$(echo $config | jq -r '.serial_com_type')"
echo "::set-output name=drive_path::$(echo $config | jq -r '.drive_path')"
# - name: Copy artifact to hardware drive
# run: |
# echo "Programming the board"
Expand All @@ -165,16 +176,8 @@ jobs:
# copy .\build\${{ matrix.project }}.bin $drive_path
# echo "Programmed the board"

- name: Read configuration from JSON
id: config
run: |
config=$(jq -r '.${{ matrix.project }}' config.json)
echo "::set-output name=serialport::$(echo $config | jq -r '.serialport')"
echo "::set-output name=device_name::$(echo $config | jq -r '.device_name')"
echo "::set-output name=platform_name::$(echo $config | jq -r '.platform_name')"
echo "::set-output name=serial_com_type::$(echo $config | jq -r '.serial_com_type')"
- name: Run tests
shell: bash
run: |
cd projects/${{ matrix.project }}/tests
pytest -c pytest.ini --serialport "${{ steps.config.outputs.serialport }}" --device_name "${{ steps.config.outputs.device_name }}" --platform_name "${{ steps.config.outputs.platform_name }}" --serial_com_type "${{ steps.config.outputs.serial_com_type }}"
Expand Down

0 comments on commit 0575013

Please sign in to comment.