Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test reports to release #126

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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