Skip to content

Commit 59955e6

Browse files
committed
pr scripts with tests
1 parent 1cc8a9d commit 59955e6

12 files changed

+5122
-2
lines changed

.github/workflows/build-cli-native-archives.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Build native CLI archives
33
on:
44
workflow_call:
55

6+
env:
7+
VERSION_SUFFIX_OVERRIDE: ${{ github.event_name == 'pull_request' && format('/p:VersionSuffix=pr.{0}', github.event.number) || '' }}
8+
69
jobs:
710

811
build_cli_archives:
@@ -36,6 +39,7 @@ jobs:
3639
/p:ContinuousIntegrationBuild=true
3740
/p:SkipManagedBuild=true
3841
/p:TargetRids=${{ matrix.targets.rids }}
42+
${{ env.VERSION_SUFFIX_OVERRIDE }}
3943
4044
- name: Build CLI packages (Unix)
4145
env:
@@ -51,6 +55,7 @@ jobs:
5155
/p:ContinuousIntegrationBuild=true
5256
/p:SkipManagedBuild=true
5357
/p:TargetRids=${{ matrix.targets.rids }}
58+
${{ env.VERSION_SUFFIX_OVERRIDE }}
5459
5560
- name: Upload logs
5661
if: always()

.github/workflows/run-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ on:
4141
type: string
4242
default: "ubuntu-latest"
4343

44+
env:
45+
VERSION_SUFFIX_OVERRIDE: ${{ github.event_name == 'pull_request' && format('/p:VersionSuffix=pr.{0}', github.event.number) || '' }}
46+
4447
jobs:
4548

4649
test:
@@ -159,7 +162,7 @@ jobs:
159162
env:
160163
CI: false
161164
run: |
162-
${{ env.BUILD_SCRIPT }} -restore -ci -build -projects ${{ env.TEST_PROJECT_PATH }}
165+
${{ env.BUILD_SCRIPT }} -restore -ci -build -projects ${{ env.TEST_PROJECT_PATH }} ${{ env.VERSION_SUFFIX_OVERRIDE }}
163166
164167
- name: Build and archive test project
165168
if: ${{ inputs.requiresNugets }}
@@ -169,6 +172,7 @@ jobs:
169172
${{ env.BUILD_SCRIPT }} -restore -ci -build -projects ${{ env.TEST_PROJECT_PATH }}
170173
/p:PrepareForHelix=true
171174
/bl:${{ github.workspace }}/artifacts/log/Debug/PrepareForHelix.binlog
175+
${{ env.VERSION_SUFFIX_OVERRIDE }}
172176
173177
# Workaround for bug in Azure Functions Worker SDK. See https://github.com/Azure/azure-functions-dotnet-worker/issues/2969.
174178
- name: Rebuild for Azure Functions project

.github/workflows/tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ name: Tests
44
on:
55
workflow_call
66

7+
env:
8+
VERSION_SUFFIX_OVERRIDE: ${{ github.event_name == 'pull_request' && format('/p:VersionSuffix=pr.{0}', github.event.number) || '' }}
9+
710
jobs:
811
# Duplicated jobs so their dependencies are not blocked on both the
912
# setup jobs
@@ -63,7 +66,7 @@ jobs:
6366
- name: Build with packages
6467
env:
6568
CI: false
66-
run: ./build.sh -restore -build -ci -pack -bl -p:InstallBrowsersForPlaywright=false -p:SkipTestProjects=true
69+
run: ./build.sh -restore -build -ci -pack -bl -p:InstallBrowsersForPlaywright=false -p:SkipTestProjects=true ${{ env.VERSION_SUFFIX_OVERRIDE }}
6770

6871
- name: Upload built NuGets
6972
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1

0 commit comments

Comments
 (0)