From 3069e35f21edc788c1694c5115fb4f9434b086ca Mon Sep 17 00:00:00 2001 From: Giorgi Date: Mon, 5 Aug 2024 00:42:10 +0400 Subject: [PATCH] Add Github Actions --- .github/workflows/dotnet.yml | 36 +++++++++++++++++++ EntityFramework.Exceptions.Tests/Tests.csproj | 4 +++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..302dd28 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,36 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: Build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal --logger GitHubActions /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:Exclude="[*]EntityFramework.Exceptions.Common.*Exception" + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@v2.3.0 + with: + github-token: ${{ secrets.github_token }} + format: lcov + fail-on-error: false + path-to-lcov: EntityFramework.Exceptions.Tests/coverage.info + diff --git a/EntityFramework.Exceptions.Tests/Tests.csproj b/EntityFramework.Exceptions.Tests/Tests.csproj index a22b7a2..80fe4f6 100644 --- a/EntityFramework.Exceptions.Tests/Tests.csproj +++ b/EntityFramework.Exceptions.Tests/Tests.csproj @@ -9,6 +9,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive +