Skip to content

Commit

Permalink
🔧Run PR with basic tests only
Browse files Browse the repository at this point in the history
  • Loading branch information
pleonex committed Jan 16, 2024
1 parent 724f7ff commit d0c8a20
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
branches: [ main ]
# Stable
tags: [ "v*" ]
# Allow external PR with secrets
pull_request_target:
types: [labeled]

jobs:
build:
Expand All @@ -21,8 +18,6 @@ jobs:
dotnet_version: '8.0.100'
secrets:
test_resources: ${{ secrets.TEST_RESOURCES_URI_V1 }}
# Allow to run in external PR if the label is present
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'allow workflow')

# Preview release on push to main only
# Stable release on version tag push only
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
is_main_build: true
name: "${{ matrix.os }}"
runs-on: ${{ matrix.os }}
env:
test_resources: ${{ secrets.test_resources }}
steps:
- name: "Checkout"
uses: actions/checkout@v4
Expand All @@ -32,8 +34,16 @@ jobs:
with:
dotnet-version: ${{ inputs.dotnet_version }}

- name: "Build and test"
run: dotnet run --project build/orchestrator -- --resource-uri=${{ secrets.test_resources }} --target=Default --dotnet-configuration=Release
- if: ${{ env.test_resources != '' }}
name: "Build and run FULL tests"
run: dotnet run --project build/orchestrator -- --resource-uri=${{ env.test_resources }} --target=Default --dotnet-configuration=Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# External PR will run basic tests due to the complexity to make it work with secrets
- if: ${{ env.test_resources == '' }}
name: "Build and run basic tests"
run: dotnet run --project build/orchestrator -- --target=Default --dotnet-configuration=Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit d0c8a20

Please sign in to comment.