-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.15 KB
/
build-and-test.yml
File metadata and controls
41 lines (34 loc) · 1.15 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
name: Build & Run Unit Tests
on:
pull_request:
jobs:
build-and-test:
name: Build and Unit Tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
cache: false
- name: Restore
run: dotnet restore Couchbase.Analytics.sln
- name: Build (Release)
run: dotnet build Couchbase.Analytics.sln --configuration Release --no-restore
- name: Test - Couchbase.Analytics.UnitTests
run: dotnet test tests/Couchbase.Analytics.UnitTests/Couchbase.Analytics.UnitTests.csproj --configuration Release --no-build --logger "trx;LogFileName=unit-tests.trx" --results-directory "TestResults"
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-results-${{ matrix.os }}
path: TestResults