π make coverage badge flat-square (#50) #13
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: Main Workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download SurrealDB | |
run: curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh | |
- name: Run SurrealDB root | |
run: surreal start --user root --pass root memory --auth --allow-guests & | |
- name: Setup dotnet 8.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "8.0.x" | |
- name: Install .NET tools | |
run: dotnet tool restore | |
- name: Check Formatting | |
run: dotnet csharpier --check . | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore --warnaserror | |
- name: Test library | |
run: > | |
dotnet test | |
./SurrealDb.Net.Tests/SurrealDb.Net.Tests.csproj | |
--no-restore | |
--no-build | |
--collect "XPlat Code Coverage" | |
--results-directory .coverage | |
-- | |
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
- name: Test Live Query feature | |
run: > | |
dotnet test | |
./SurrealDb.Net.LiveQuery.Tests/SurrealDb.Net.LiveQuery.Tests.csproj | |
--no-restore | |
--no-build | |
--collect "XPlat Code Coverage" | |
--results-directory .coverage | |
-- | |
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: .coverage |