-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.48 KB
/
Copy pathci.yml
File metadata and controls
57 lines (45 loc) · 1.48 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
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Build, test, and pack
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore Termii.SDK.sln
- name: Build
run: dotnet build Termii.SDK.sln --configuration Release --no-restore
- name: Unit tests
run: dotnet test tests/Termii.Tests/Termii.Tests.csproj --configuration Release --no-build --logger "trx;LogFileName=unit-tests.trx"
- name: Integration tests
run: dotnet test tests/Termii.IntegrationTests/Termii.IntegrationTests.csproj --configuration Release --no-build --logger "trx;LogFileName=integration-tests.trx"
- name: Pack
run: dotnet pack src/Termii/Termii.csproj --configuration Release --no-build --output artifacts/packages
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
**/TestResults/*.trx
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: |
artifacts/packages/*.nupkg
artifacts/packages/*.snupkg