-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.18 KB
/
Copy pathpull-request.yml
File metadata and controls
48 lines (38 loc) · 1.18 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
name: Pull Request
on:
workflow_dispatch:
pull_request:
branches: [main, develop]
paths: ['src/KappaDuck.Quack/**', 'tests/**', '**.props', 'global.json', '.github/workflows/pull-request.yml']
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
checks: write
pull-requests: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
quack: ./src/KappaDuck.Quack/KappaDuck.Quack.csproj
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: ./global.json
- name: Restore dependencies
run: dotnet restore ${{ env.quack }}
- name: Build
run: dotnet build ${{ env.quack }} --configuration release --no-restore
- name: Run tests
continue-on-error: true
run: dotnet test --configuration release -- --report-trx
- name: Upload Test Results
if: (!cancelled())
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: '**/TestResults/*.trx'