This repository has been archived by the owner on Mar 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (50 loc) · 1.79 KB
/
build.yml
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
52
53
54
name: Build solution and run tests
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build project and run tests
runs-on: ubuntu-latest
env:
CONFIGURATION: 'Release'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
dotnet-quality: 'preview'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c ${{ env.CONFIGURATION }} --no-restore
- name: Test
env:
AzureAD__Audience: ${{ vars.AZUREAD_AUDIENCE }}
AzureAD__ClientId: ${{ vars.AZUREAD_CLIENTID }}
AzureAD__Domain: ${{ vars.AZUREAD_DOMAIN }}
AzureAD__Instance: ${{ vars.AZUREAD_INSTANCE }}
AzureAD__TenantId: ${{ vars.AZURE_TENANT_ID }}
UserAuthenticationSettings__Audience: ${{ vars.AZUREAD_AUDIENCE }}
UserAuthenticationSettings__ClientId: ${{ vars.INTEGRATION_TEST_CLIENT_ID }}
UserAuthenticationSettings__Password: ${{ secrets.INTEGRATION_TEST_PASSWORD }}
UserAuthenticationSettings__TenantId: ${{ vars.AZURE_TENANT_ID }}
UserAuthenticationSettings__Username: ${{ vars.INTEGRATION_TEST_USERNAME }}
run: dotnet test -c ${{ env.CONFIGURATION }} --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: 'coverage/**/coverage.cobertura.xml'
fail_ci_if_error: true