Skip to content

Commit

Permalink
Add test reports to release
Browse files Browse the repository at this point in the history
  • Loading branch information
soumeh01 committed Nov 29, 2023
1 parent d6cc10b commit 84a804f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,33 @@ on:
permissions: read-all

jobs:
test:
uses: Open-CMSIS-Pack/cbuild/.github/workflows/test.yml@main

goreleaser:
needs: test
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Download coverage report
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: test-results
path: testreport/

- name: Zip test reports
run: |
zip -r testreport.zip testreport
- name: Attach coverage report to release assets
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: testreport.zip
tag: ${{ github.ref }}
overwrite: true

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- '!**/*.md'
push:
branches: [ main ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -119,7 +120,7 @@ jobs:
- name: Archive unit test results
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: unit-test-result-${{ matrix.target }}
name: test-result
path: ./build/cbuild-testreport-*.xml
if-no-files-found: error

Expand Down

0 comments on commit 84a804f

Please sign in to comment.