This commit is contained in:
eelke 2026-02-27 18:54:01 +01:00
parent 1cd7fb659a
commit d8f6024afd
2 changed files with 0 additions and 82 deletions

View file

@ -1,71 +0,0 @@
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Cache Docker image (postgres)
id: docker-cache
uses: actions/cache@v4
with:
path: /tmp/docker-postgres.tar
key: ${{ runner.os }}-docker-postgres-18.1
- name: Load cached postgres image or pull
run: |
if [ -f /tmp/docker-postgres.tar ]; then
docker load -i /tmp/docker-postgres.tar
else
docker pull postgres:18.1
docker save postgres:18.1 -o /tmp/docker-postgres.tar
fi
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test with coverage
run: |
dotnet test --no-build --configuration Release \
--collect:"XPlat Code Coverage" \
--results-directory ./coverage \
-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura
- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
format: markdown
output: both
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: ./coverage/**/coverage.cobertura.xml
retention-days: 7

View file

@ -2,14 +2,3 @@
IdentityShroud is a .NET project for identity management and protection.
## Build and Test
```bash
dotnet restore
dotnet build
dotnet test
```
## Coverage
Coverage reports are generated automatically in CI and displayed in pull request comments.