Skip to content

Commit

Permalink
added ci for code coverage and build
Browse files Browse the repository at this point in the history
  • Loading branch information
Eliaxie committed Jul 26, 2023
1 parent 9efdf0e commit 15b1790
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
File renamed without changes.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
bots:
- Bot1
- Bot2
- Bot3
# Add more bots here
defaults:
run:
working-directory: ${{ matrix.bots }}
steps:
- uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Test
run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./${{ matrix.bots }}/coverage.opencover.xml
7 changes: 7 additions & 0 deletions PoliNetworkBot/PoliNetworkBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>

0 comments on commit 15b1790

Please sign in to comment.