-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (46 loc) · 2.14 KB
/
pullrequest.yml
File metadata and controls
59 lines (46 loc) · 2.14 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
52
53
54
55
56
57
58
name: Build and Test Pull Requests
on:
pull_request:
branches:
- main
jobs:
build:
name: "Build and Test Pull Requests"
env:
ASPNETCORE_ENVIRONMENT: "Production"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Restore Nuget Packages
run: dotnet restore CallbackHandler.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}
- name: Build Code
run: dotnet build CallbackHandler.sln --configuration Release
- name: Run Unit Tests
run: |
echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}"
dotnet test "CallbackHandler.BusinessLogic.Tests\CallbackHandler.BusinessLogic.Tests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=businesslogic-test-results.trx"
dotnet test "CallbackHandler.CallbackMessageAggregate.Tests\CallbackHandler.CallbackMessageAggregate.Tests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=callbackmessageaggregate-test-results.trx"
dotnet test "CallbackHandler.Tests\CallbackHandler.Tests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=callbackhandler-test-results.trx"
- name: Build Docker Image
run: docker build . --file CallbackHandler/Dockerfile --tag callbackhandler:latest
- name: Run Integration Tests
run: dotnet test "CallbackHandler.IntegrationTests\CallbackHandler.IntegrationTests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=integration-test-results.trx"
- uses: actions/[email protected]
with:
name: tracelogs
path: /home/runner/trace/
- name: Publish test results
uses: dorny/test-reporter@v1
if: always()
with:
name: Unit Test Results
path: '**/TestResults/*.trx'
reporter: dotnet-trx
fail-on-error: true
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: '**/TestResults/*.trx'
retention-days: 30