Steven Lemon
Jan 9, 2023

--

We're using SonarCloud for aggregating coverage, and fortunately, it is able to combine partial coverage files for us.

Because files aren't shared between build agents, to get files from our the build agents running our tests to the agent running SonarCloud, we upload and download the coverage files from the pipeline.

```

- name: Rename coverage file

run: |

mv app/coverage/lcov.info app/coverage/${{ matrix.testGroup }}-lcov.info

- name: Upload coverage files

uses: actions/upload-artifact@v3

with:

name: coverage

path: app/coverage/*-lcov.info

if: ${{ always() }}

```

```

- name: Download coverage

uses: actions/download-artifact@v3

with:

name: coverage

```

--

--

Steven Lemon
Steven Lemon

Written by Steven Lemon

Lead Software Engineer and occasional Scrum Master. Writing about the less technical parts of being a developer.

No responses yet