-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (47 loc) · 1.13 KB
/
dotnet-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
44
45
46
47
48
49
50
name: .NET Testing
on:
pull_request:
branches:
- '**'
jobs:
test:
name: Test (.NET ${{ matrix.version }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
version:
- 6.x
- 7.x
- 8.x
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: extractions/setup-just@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.version }}
- name: Setup dotnet tools
run: dotnet tool restore
- name: Generate gRPC code
run: just generate-grpc
- name: Test
run: dotnet test --configuration Release
result:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Results
needs: [ test ]
steps:
- run: |
result="${{ needs.test.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi