Skip to content

Commit

Permalink
ci: improve GHA
Browse files Browse the repository at this point in the history
fix size report generation,
fetch PR body from CLI (allow change and rerun tests)
merge jobs for creating PR in nrf

Signed-off-by: Robert Gałat <[email protected]>
  • Loading branch information
RobertGalatNordic committed Apr 15, 2024
1 parent 69dc434 commit 3938ec9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
10 changes: 4 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ manifest-pr-skip (remove this line to create PR in NRF)

JIRA ticket:

Detail description of the change

## Self review

- [ ] There is no commented code.
- [ ] There is no TODO/FIXME comments without associated issue ticket.
- [ ] Commits are properly organized
- [ ] Verification
- [ ] Unit tests were updated to include the change.
- [ ] Change has been tested.
- [ ] There are no TODO/FIXME comments without associated issue ticket.
- [ ] Commits are properly organized.
- [ ] Change has been tested.
- [ ] Tests were updated (if applicable).
6 changes: 5 additions & 1 deletion .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ jobs:
NRF_revision: ${{ steps.config.outputs.NRF_revision }}
steps:
- name: Read body of PR
run: printf "%s\n" "${{ github.event.pull_request.body }}" > pr_body.md
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{github.repository}}/pulls/${{github.event.number}} --jq '.body' > pr_body.md
- name: Get nrf revision
id: config
shell: bash {0}
run: |
cat pr_body.md
grep -oP "(NRF_revision=)[a-zA-Z0-9/_-]*" pr_body.md > config
if [ $? != 0 ]; then
echo "NRF_revision=main" >> $GITHUB_OUTPUT;
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/on-pr_nrf_manifest_update_PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ on:
- main

jobs:
github_context:
create-manifest-pr:
runs-on: ubuntu-latest
steps:
- name: Print Github context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

create-manifest-pr:
runs-on: ubuntu-latest
steps:
- name: Create manifest PR
uses: nrfconnect/action-manifest-pr@main
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Twister build manual tests
run: |
source zephyr/zephyr-env.sh
west twister --testsuite-root sidewalk/tests/manual --inline-logs --overflow-as-errors --show-footprint --footprint-from-buildlog -vvv --build-only --subset ${{ matrix.subset }}/${{ env.MAX_SUBSETS }}
west twister --testsuite-root sidewalk/tests/manual --inline-logs --overflow-as-errors --enable-size-report --show-footprint --footprint-from-buildlog -vvv --build-only --subset ${{ matrix.subset }}/${{ env.MAX_SUBSETS }}
- name: Prepare artifacts for upload
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Twister build samples
run: |
source zephyr/zephyr-env.sh
west twister --testsuite-root sidewalk/samples/ --inline-logs --overflow-as-errors --show-footprint --footprint-from-buildlog -vvv --build-only --subset ${{ matrix.subset }}/${{ env.MAX_SUBSETS }}
west twister --testsuite-root sidewalk/samples/ --inline-logs --overflow-as-errors --enable-size-report --show-footprint --footprint-from-buildlog -vvv --build-only --subset ${{ matrix.subset }}/${{ env.MAX_SUBSETS }}
- name: Prepare artifacts for upload
run: |
Expand Down

0 comments on commit 3938ec9

Please sign in to comment.