Skip to content

Trying to fix coveralls workflow #1096

Trying to fix coveralls workflow

Trying to fix coveralls workflow #1096

Workflow file for this run

name: Coveralls Code Coverage
on:
push:
pull_request:
jobs:
test-platforms:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04, windows-latest, macos-latest]
env:
dotNetVersion: net6.0
dotNetConfiguration: Release
steps:
# checkout the repo
- uses: actions/checkout@v2
with:
submodules: 'true'
# install dependencies, build, and test
- name: Setup Dotnet for use with actions
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.x'
- name: Cache Nuget Packages
uses: actions/cache@v2
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Run automated unit and integration tests
run: dotnet test
build:
runs-on: windows-latest
env:
dotNetVersion: net6.0
dotNetConfiguration: Release
runtimeTarget: win-x86
strategy:
matrix:
test_project:
- AuthoringToolTest
- BackendAccessTest
- BusinessLogicTest
- DataAccessTest
- GeneratorTest
- IntegrationTest
- PresentationTest
- SharedTest
steps:
# checkout the repo
- uses: actions/checkout@v2
with:
submodules: 'true'
# install runtime
- name: Setup Dotnet for use with actions
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.x'
# build only the specific test project we are testing
- name: Build test project
run: dotnet build ${{ matrix.test_project }}
# run test with coverage collection
- name: Run ${{ matrix.test_project }} tests
run: dotnet test ${{ matrix.test_project }} --collect:"XPlat Code Coverage" --settings coverlet.runsettings
# submit result from parallel to coveralls
- name: Coveralls Parallel
uses: coverallsapp/github-action@95b1a2355bd0e526ad2fd62da9fd386ad4c98474
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
file: ${{ matrix.test_project }}/TestResults/*/coverage.cobertura.xml
finish:
needs: build
if: ${{ always() }}
runs-on: windows-latest
steps:
# tell coveralls we are done with this run
- name: Coveralls Finished
uses: coverallsapp/github-action@95b1a2355bd0e526ad2fd62da9fd386ad4c98474
with:
parallel-finished: true
carryforward: "run-AuthoringToolTest,run-BackendAccessTest,run-BusinessLogicTest,run-DataAccessTest,run-GeneratorTest,run-IntegrationTest,run-PresentationTest,run-SharedTest"
send-summary:
runs-on: ubuntu-latest
if: ${{ always() }}
needs:
- build
- test-platforms
- finish
steps:
- uses: CalmDownVal/webhook-summary@v1
with:
token: ${{ github.token }}
url: ${{ secrets.DISCORD_WEBHOOK }}