-
Notifications
You must be signed in to change notification settings - Fork 10
43 lines (35 loc) · 1.04 KB
/
build_and_test.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
name: .NET Build and Test
on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
env:
BUILD_CONFIG: 'Release'
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: docker compose -f ./docker-compose/docker-compose.tests.yml up -d
run: docker compose -f ./docker-compose/docker-compose.tests.yml up -d
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration $BUILD_CONFIG -p:Version=1.0.0 --no-restore
- name: Test
run: dotnet test --no-build --configuration $BUILD_CONFIG --logger "trx" --verbosity d --results-directory "./"
- name: Upload test results
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: ./*.trx