Add Mqtt extension and generator/parser support #214
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ | |