-
Notifications
You must be signed in to change notification settings - Fork 9
46 lines (43 loc) · 1.33 KB
/
test-dotnet-samples.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
name: test-samples
on:
pull_request:
push:
branches: [ develop, main ]
env:
DOTNET_VERSION: '6.x'
jobs:
run-samples:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
dir: [
'Annotations/Annotations/',
'Annotations/InkAnnotations/',
'Annotations/LinkAnnotation/',
'Annotations/PolygonAnnotations/',
'Annotations/PolyLineAnnotations/'
]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build samples
working-directory: ${{ matrix.dir }}
run: dotnet build -c Release *.csproj
- name: List files
run: |
ls ${{matrix.dir}}
- name: Run samples
working-directory: ${{matrix.dir}}
run: |
file_path="${{ matrix.dir }}"
dll_name=$(echo "$file_path" | cut -d'/' -f2)
echo "Now running ${{ dll_name }}.dll"
dotnet bin/Release/net6.0/$dll_name