mirror of
https://github.com/actions/github-script.git
synced 2026-05-13 11:26:55 +00:00
Merge pull request #712 from actions/salmanmkc/deployment-false + fix user-agent test to handle orchestration ID
ci: use deployment: false for integration test environments
This commit is contained in:
22
.github/workflows/integration.yml
vendored
22
.github/workflows/integration.yml
vendored
@@ -155,21 +155,21 @@ jobs:
|
|||||||
result-encoding: string
|
result-encoding: string
|
||||||
- run: |
|
- run: |
|
||||||
echo "- Validating user-agent default"
|
echo "- Validating user-agent default"
|
||||||
expected="actions/github-script octokit-core.js/"
|
ua="${{steps.user-agent-default.outputs.result}}"
|
||||||
if [[ "${{steps.user-agent-default.outputs.result}}" != "$expected"* ]]; then
|
if [[ "$ua" != "actions/github-script octokit-core.js/"* ]] && [[ "$ua" != "actions/github-script actions_orchestration_id/"* ]]; then
|
||||||
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-default.outputs.result}}"
|
echo $'::error::\u274C' "Expected user-agent to start with 'actions/github-script', got $ua"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "- Validating user-agent set to a value"
|
echo "- Validating user-agent set to a value"
|
||||||
expected="foobar octokit-core.js/"
|
ua="${{steps.user-agent-set.outputs.result}}"
|
||||||
if [[ "${{steps.user-agent-set.outputs.result}}" != "$expected"* ]]; then
|
if [[ "$ua" != "foobar octokit-core.js/"* ]] && [[ "$ua" != "foobar actions_orchestration_id/"* ]]; then
|
||||||
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-set.outputs.result}}"
|
echo $'::error::\u274C' "Expected user-agent to start with 'foobar', got $ua"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "- Validating user-agent set to an empty string"
|
echo "- Validating user-agent set to an empty string"
|
||||||
expected="actions/github-script octokit-core.js/"
|
ua="${{steps.user-agent-empty.outputs.result}}"
|
||||||
if [[ "${{steps.user-agent-empty.outputs.result}}" != "$expected"* ]]; then
|
if [[ "$ua" != "actions/github-script octokit-core.js/"* ]] && [[ "$ua" != "actions/github-script actions_orchestration_id/"* ]]; then
|
||||||
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-empty.outputs.result}}"
|
echo $'::error::\u274C' "Expected user-agent to start with 'actions/github-script', got $ua"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
|
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
|
||||||
@@ -178,7 +178,9 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
environment: ['', 'debug-integration-test']
|
environment: ['', 'debug-integration-test']
|
||||||
environment: ${{ matrix.environment }}
|
environment:
|
||||||
|
name: ${{ matrix.environment }}
|
||||||
|
deployment: false
|
||||||
name: "Integration test: debug option (runner.debug mode ${{ matrix.environment && 'enabled' || 'disabled' }})"
|
name: "Integration test: debug option (runner.debug mode ${{ matrix.environment && 'enabled' || 'disabled' }})"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user