-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.59 KB
/
Copy pathbuild.yaml
File metadata and controls
51 lines (44 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Run tests with coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
validate_commit:
name: Validate commit
runs-on: ubuntu-latest
if: ${{ github.ref != 'refs/heads/main' }}
steps:
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Run unit tests
working-directory: ./test/SnD.ApiClient.Tests
run: |
dotnet add package coverlet.msbuild &&
dotnet test SnD.ApiClient.Tests.csproj --configuration Debug --runtime linux-x64 /p:CollectCoverage=true /p:CoverletOutput=Coverage/ /p:CoverletOutputFormat=lcov --logger GitHubActions
- name: Publish Code Coverage
if: ${{ github.event_name == 'pull_request' && always() }}
uses: romeovs/lcov-reporter-action@v0.4.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: ./test/Coverage/coverage.info
- name: Setup just
uses: extractions/setup-just@v4
- name: Setup integration tests
run: just up
- name: Run acceptance tests
working-directory: ./test/SnD.ApiClient.Tests.Acceptance
run: |
dotnet test SnD.ApiClient.Tests.Acceptance.csproj --configuration Debug --runtime linux-x64
- name: Get logs from application pods
if: always()
run: |
kubectl describe pods --namespace default || true