Skip to content

Merge pull request #8 from sominola/feature/update-package #70

Merge pull request #8 from sominola/feature/update-package

Merge pull request #8 from sominola/feature/update-package #70

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-library:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
- name: Display .NET version
run: dotnet --version
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build OpenDotaApi.sln --configuration Release --no-restore
- name: Run unit tests
run: dotnet test --configuration Release --collect:"XPlat Code Coverage" --settings ./OpenDotaApi.Test/test.settings.xml
- name: Copy coverage results
run: cp ./OpenDotaApi.Test/TestResults/**/*.xml ./OpenDotaApi.Test/TestResults/
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./OpenDotaApi.Test/TestResults/coverage.opencover.xml