[github-actions] fix coverage reporting in unit workflow (#8737)

This commit is contained in:
Jonathan Hui
2023-02-09 18:24:03 -08:00
committed by GitHub
parent bbd96473fd
commit 630099bde6
+12 -3
View File
@@ -63,6 +63,8 @@ jobs:
unit-tests:
runs-on: ubuntu-20.04
env:
COVERAGE: 1
steps:
- name: Harden Runner
uses: step-security/harden-runner@18bf8ad2ca49c14cbb28b91346d626ccfb00c518 # v2.1.0
@@ -75,7 +77,7 @@ jobs:
- name: Bootstrap
run: |
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
sudo apt-get --no-install-recommends install -y ninja-build
sudo apt-get --no-install-recommends install -y ninja-build lcov
- name: Build Simulation
run: ./script/cmake-build simulation
- name: Test Simulation
@@ -84,10 +86,17 @@ jobs:
run: ./script/cmake-build posix
- name: Test POSIX
run: cd build/posix && ninja test
- name: Generate Coverage
run: |
./script/test generate_coverage gcc
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
with:
name: cov-unit-tests
path: tmp/coverage.info
upload-coverage:
needs:
- unittests
needs: unit-tests
runs-on: ubuntu-20.04
steps:
- name: Harden Runner