-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (53 loc) · 1.57 KB
/
ci.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build and Test
on:
pull_request:
branches: [ "main" ]
paths:
- 'dotnet/**'
- 'samples/**'
- 'tutorials/**'
- '!**/**.md'
push:
branches: [ "main" ]
paths:
- 'dotnet/**'
- '!**/**.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Install WASM workload
run: dotnet workload install wasm-tools
- name: Install DocFx
run: dotnet tool install -g docfx
- name: Run DocFx
run: docfx api-docs/dotnet/docfx.json
- name: Build Parser
run: dotnet build -c Release dotnet/src/DTDLParser
- name: Test Parser
run: |
dotnet test dotnet/tests/ParserUnitTest -c Release --logger trx
- name: Test Tutorials
run: |
for d in tutorials/projects/Tutorial*; do
if [ -d $d ]; then
echo testing $d ;
dotnet run --project $d > $d/output.txt ;
diff $d/expect.txt $d/output.txt ;
test $? -eq 0 || exit 1
fi
done
- name: Build Samples
run: dotnet build samples/Samples.sln
- name: Pack Parser
run: dotnet pack -c Release dotnet/src/DTDLParser
# - name: Process trx reports with default
# if: always()
# uses: im-open/[email protected]
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# base-directory: dotnet/