Update TypeExtensions.cs #34
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 & test back-end | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dotnet-ef | |
run: dotnet tool install --global dotnet-ef | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Generate creation and migrations script | |
run: dotnet ef migrations script -i -o CreateOrMigrateDatabase.sql --project Database/Database.csproj --startup-project Api/Api.csproj --context DataContext -v | |
- name: Launch SQL Server in Docker, create DB & schema, set ENV variable with the connection string | |
run: source ./devops/start_docker_sql_server_with_new_db.sh CreateOrMigrateDatabase.sql ./devops/wait-for-it.sh | |
shell: bash | |
- name: Test | |
run: dotnet test --no-build --no-restore --configuration Release --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov | |
- name: Publish coverage report to coveralls.io | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./Domain.Tests/TestResults/coverage.info |