Bump Microsoft.EntityFrameworkCore.Relational and Microsoft.EntityFrameworkCore.SqlServer #141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
ASPNETCORE_ENVIRONMENT: Test | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
services: | |
#if (systemDatabase == SqlServer) | |
sqlserver: | |
image: mcr.microsoft.com/mssql/server:2019-latest | |
ports: | |
- 1434:1433 | |
env: | |
ACCEPT_EULA: Y | |
SA_PASSWORD: SqlServer2019! | |
#else | |
postgresql: | |
image: postgres:16.3 | |
env: | |
POSTGRES_DB: AthenaTests | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: 123PgSql | |
ports: | |
- "5432:5432" | |
#endif | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2 | |
ports: | |
- "9200:9200" | |
steps: | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install SonarCloud scanner | |
run: | | |
dotnet tool install --global dotnet-sonarscanner --version 6.1.0 | |
- name: Install EF Core Tools | |
run: | | |
dotnet tool install --global dotnet-ef --version 8.0.10 | |
- name: Build and test | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: | | |
dotnet ef database update -p src/Company.Orion.Infra.Data -s src/Company.Orion.Api --verbose | |
dotnet sonarscanner begin /k:"vanderlan_Orion-Api" /o:"vanderlan-gomes" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="opencover.xml" | |
dotnet build Orion.sln | |
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=coverage /p:Exclude=[xunit.*]* Orion.sln | |
cp tests/Company.Orion.Test/coverage.opencover.xml opencover.xml | |
dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" |