Skip to content

Commit 2cae181

Browse files
authored
Merge pull request #42 from johnlokerse/johnlokerse/add-testing-action
feat: Added `dotnet test` to PR workflow
2 parents aaad038 + f24ea0b commit 2cae181

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
name: Build
1+
name: Build and Test Extension
22

33
on:
4-
push:
5-
branches: [main]
6-
paths-ignore:
7-
- 'Sample/**'
8-
- README.md
94
pull_request:
105
branches: [main]
116
workflow_dispatch:
@@ -54,4 +49,25 @@ jobs:
5449
shell: pwsh
5550
run: |
5651
$env:BICEP_TRACING_ENABLED = "true"
57-
./Infra/Scripts/Publish-Extension.ps1 -Target azure-devops-extension
52+
./Infra/Scripts/Publish-Extension.ps1 -Target azure-devops-extension
53+
54+
run-extension-tests:
55+
name: Run Extension Tests
56+
runs-on: ubuntu-latest
57+
58+
env:
59+
DOTNET_NOLOGO: true
60+
DOTNET_CLI_TELEMETRY_OPTOUT: true
61+
62+
steps:
63+
- uses: actions/checkout@v5
64+
with:
65+
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
66+
67+
- uses: actions/setup-dotnet@v4
68+
with:
69+
dotnet-version: '9.0.x'
70+
71+
- name: Run Tests
72+
run: |
73+
dotnet test

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [main]
66
paths-ignore:
77
- 'Sample/**'
8+
- README.md
89
workflow_dispatch:
910

1011
permissions:

0 commit comments

Comments
 (0)