diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index e0b287f0de..15dc39c1be 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -15,8 +15,15 @@ jobs: id: config run: | grep -oP "(NRF_revision=)[a-zA-Z0-9/_-]*" pr_body.md > config - if [ $? != 0 ]; then echo NRF_revision=main > config; fi - cat config >> $GITHUB_OUTPUT + if [ $? != 0 ]; then + echo "NRF_revision=main" >> $GITHUB_OUTPUT; + else + cat config >> $GITHUB_OUTPUT; + fi; + + - name: print nrf revision + run: | + echo ${{ steps.config.outputs.NRF_revision }} verify_PR: uses: ./.github/workflows/validate_code_style.yml diff --git a/.github/workflows/run_tests_dut.yml b/.github/workflows/run_tests_dut.yml index b9dc15a11e..6313bc4901 100644 --- a/.github/workflows/run_tests_dut.yml +++ b/.github/workflows/run_tests_dut.yml @@ -68,7 +68,7 @@ jobs: source zephyr/zephyr-env.sh west twister --platform ${{inputs.target_board}} --testsuite-root sidewalk --filter runnable --shuffle-tests --shuffle-tests-seed 123 --inline-logs --overflow-as-errors -vvv --prep-artifacts-for-testing --package-artifacts PACKAGE_ARTIFACTS_${{ inputs.subset }}.tar.bz2 --subset ${{ inputs.subset }}/${{ inputs.max_subsets }} - - name: save build artifacts + - name: Save build artifacts uses: actions/upload-artifact@v4 with: path: PACKAGE_ARTIFACTS_${{ inputs.subset }}.tar.bz2 @@ -86,6 +86,8 @@ jobs: volumes: - /dev:/dev - /run/udev:/run/udev + permissions: + actions: write defaults: run: shell: nrfutil toolchain-manager launch --install-dir /root/ncs bash -- {0} @@ -122,11 +124,6 @@ jobs: with: name: DUT_artifacts_${{inputs.target_board}}_${{ inputs.subset }} - - name: Delete artifacts - uses: geekyeggo/delete-artifact@v4 - with: - name: DUT_artifacts_${{inputs.target_board}}_${{ inputs.subset }} - - name: Unwrap artifacts run: | tar -xf PACKAGE_ARTIFACTS_${{ inputs.subset }}.tar.bz2 @@ -140,6 +137,11 @@ jobs: run: | mv twister-out/twister.xml twister-out/${{inputs.target_board}}_${{ inputs.subset }}_twister.xml + - name: Delete artifacts + uses: geekyeggo/delete-artifact@v4 + with: + name: DUT_artifacts_${{inputs.target_board}}_${{ inputs.subset }} + - name: Upload test results uses: actions/upload-artifact@v4 if: always() diff --git a/.github/workflows/validate_code_style.yml b/.github/workflows/validate_code_style.yml index 872048eea4..1ba3af78c8 100644 --- a/.github/workflows/validate_code_style.yml +++ b/.github/workflows/validate_code_style.yml @@ -44,11 +44,20 @@ jobs: steps: - name: Checkout + if: ${{github.event_name != 'pull_request'}} uses: actions/checkout@v4 with: fetch-depth: 0 path: sidewalk + - name: Checkout + if: ${{github.event_name == 'pull_request'}} + uses: actions/checkout@v4 + with: + fetch-depth: 0 + path: sidewalk + ref: ${{ github.event.pull_request.head.sha }} + - name: update NRF run: | cd sidewalk && git rev-parse HEAD > /workdir/sidewalk_hash; cd .. diff --git a/README.rst b/README.rst index fefbcac574..b6ed354722 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,6 @@ .. image:: https://github.com/nrfconnect/sdk-sidewalk/actions/workflows/on-commit.yml/badge.svg?branch=main :target: https://github.com/nrfconnect/sdk-sidewalk/actions/workflows/on-commit.yml -.. image:: https://github.com/nrfconnect/sdk-sidewalk/actions/workflows/verify-new-ncs.yml/badge.svg - :target: https://github.com/nrfconnect/sdk-sidewalk/actions/workflows/verify-new-ncs.yml - nRF Connect SDK: sdk-sidewalk #############################