-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.25 KB
/
dotnet.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
51
52
name: .NET - Ubuntu
on:
push:
branches: [ "next" ]
pull_request:
branches: [ "next" ]
permissions:
contents: read
statuses: write
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['9.0.101']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Update GitHub status check
if: always()
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'Tests'
description: 'The tests ${{ job.status == ''success'' && ''passed'' || ''failed'' }}'
state: ${{ job.status == 'success' && 'success' || 'failure' }}
sha: ${{ github.event.pull_request.head.sha || github.sha }}
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}