-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (45 loc) · 1.1 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
name: .NET Testing
on:
pull_request:
branches:
- '**'
jobs:
test:
name: Test (.NET ${{ matrix.version }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
version:
- 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