Skip to content

Commit

Permalink
run-tests.yaml: Make sure the script errors out if any call fails
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Rønningstad <[email protected]>
  • Loading branch information
oyvindronningstad committed Jan 17, 2024
1 parent ae964ce commit c962436
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/actions/install_zcbor/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ runs:
if: ${{ inputs.zcbor_package == 'bdist_wheel' }}
shell: sh
run: |
set -e
python3 -m build
pip3 install dist/zcbor-*.tar.gz
pip3 uninstall -y zcbor
Expand Down
1 change: 1 addition & 0 deletions .github/actions/prepare_and_run_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ runs:
working-directory: tests
shell: sh
run: |
set -e
export ZEPHYR_BASE=$(pwd)/../zephyr-clone
export ZEPHYR_TOOLCHAIN_VARIANT=${{ inputs.zephyr_toolchain }}
${{ inputs.zephyr_toolchain == 'zephyr' && 'export ZEPHYR_SDK_INSTALL_DIR=$(pwd)/../zephyr-sdk' || '' }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ jobs:
- name: Generate and install zcbor package
run: |
python build bdist_wheel
pip install dist/zcbor-$env:ZCBOR_VERSION-py3-none-any.whl
$ErrorActionPreference="Stop"
python -m build; if($LastExitCode -ne 0) {Write-Error "$LastExitCode"};
pip install dist/zcbor-$env:ZCBOR_VERSION-py3-none-any.whl; if($LastExitCode -ne 0) {Write-Error "$LastExitCode"};
pip uninstall -y zcbor
pip install -e .
Expand Down Expand Up @@ -131,6 +132,7 @@ jobs:
- name: Run python release tests
working-directory: tests/scripts
run: |
set -e
echo -n ${{ github.head_ref }} > HEAD_REF
python3 -m unittest test_versions
rm HEAD_REF
Expand Down

0 comments on commit c962436

Please sign in to comment.