Skip to content

Commit f552b34

Browse files
authored
Only make tests mandatory for PRs (#80)
1 parent 80ea0be commit f552b34

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/main_kooktime.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
jobs:
1515
test:
1616
runs-on: ubuntu-latest
17+
if: github.event_name == 'pull_request'
1718

1819
steps:
1920
- name: "Checkout Github Action"
@@ -30,9 +31,16 @@ jobs:
3031
- name: Test
3132
run: scripts/test
3233

34+
- name: Test Report
35+
uses: dorny/test-reporter@v1
36+
if: always()
37+
with:
38+
name: .NET Tests
39+
path: src/CookTimeTests/TestResults/*.trx
40+
reporter: dotnet-trx
41+
3342
deploy:
3443
runs-on: ubuntu-latest
35-
needs: test
3644
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
3745

3846
steps:

scripts/test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ echo "API is healthy!"
2424
echo ""
2525
echo "Running tests..."
2626
cd "$(dirname "$0")/../src/CookTimeTests"
27-
dotnet test --verbosity normal
27+
dotnet build -v minimal
28+
dotnet test --verbosity normal --no-build --logger "trx;LogFileName=test-results.trx" -- RunConfiguration.DisableParallelization=true

0 commit comments

Comments
 (0)