Update GitHub Actions (major) #158
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: .NET Build & Integration Test | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
integration: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 5.0.x | |
- name: Restore Dependencies | |
run: dotnet restore src | |
- name: Build | |
run: dotnet build src --configuration Release --no-restore | |
- name: Set up SQL Database | |
run: docker-compose up --detach sql-server-db | |
- name: Integration Tests | |
run: | | |
cd ./tests/Integration/ | |
dotnet test --no-restore -nodereuse:false \ | |
/p:UseSharedCompilation=false \ | |
/p:UseRazorBuildServer=false \ | |
/p:CollectCoverage=true \ | |
/p:CoverletOutputFormat=opencover \ | |
/p:CoverletOutput=/home/runner/work/Gossip/ \ | |
- name: Publish Code Coverage | |
uses: codecov/codecov-action@v5 | |
with: | |
files: /home/runner/work/Gossip/coverage.opencover.xml | |
fail_ci_if_error: true |