Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run build + test for draft PRs #894

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/run_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,33 @@ on:
- "scripts/**"

jobs:
# if this is for a draft PR, build + run tests only
test-dotnet-only:
if: github.event.pull_request.draft == true
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/protagonist
env:
BUILD_CONFIG: "Release"
SOLUTION: "protagonist.sln"
steps:
- id: checkout
uses: actions/checkout@v4
- id: setup-dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
- id: restore-dotnet-dependencies
run: dotnet restore $SOLUTION
- id: build-dotnet
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore
- id: test-dotnet
run: dotnet test $SOLUTION --filter 'Category!=Manual' --configuration $BUILD_CONFIG --no-restore --no-build --verbosity normal

# if this is NOT a draft: build, test, sonar-scan and build images
test-dotnet:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
defaults:
run:
Expand Down
Loading