mirror of
https://github.com/actions/github-script.git
synced 2026-04-30 02:30:11 +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:
@@ -155,21 +155,21 @@ jobs:
|
||||
result-encoding: string
|
||||
- run: |
|
||||
echo "- Validating user-agent default"
|
||||
expected="actions/github-script octokit-core.js/"
|
||||
if [[ "${{steps.user-agent-default.outputs.result}}" != "$expected"* ]]; then
|
||||
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-default.outputs.result}}"
|
||||
ua="${{steps.user-agent-default.outputs.result}}"
|
||||
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 'actions/github-script', got $ua"
|
||||
exit 1
|
||||
fi
|
||||
echo "- Validating user-agent set to a value"
|
||||
expected="foobar octokit-core.js/"
|
||||
if [[ "${{steps.user-agent-set.outputs.result}}" != "$expected"* ]]; then
|
||||
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-set.outputs.result}}"
|
||||
ua="${{steps.user-agent-set.outputs.result}}"
|
||||
if [[ "$ua" != "foobar octokit-core.js/"* ]] && [[ "$ua" != "foobar actions_orchestration_id/"* ]]; then
|
||||
echo $'::error::\u274C' "Expected user-agent to start with 'foobar', got $ua"
|
||||
exit 1
|
||||
fi
|
||||
echo "- Validating user-agent set to an empty string"
|
||||
expected="actions/github-script octokit-core.js/"
|
||||
if [[ "${{steps.user-agent-empty.outputs.result}}" != "$expected"* ]]; then
|
||||
echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-empty.outputs.result}}"
|
||||
ua="${{steps.user-agent-empty.outputs.result}}"
|
||||
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 'actions/github-script', got $ua"
|
||||
exit 1
|
||||
fi
|
||||
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
|
||||
@@ -178,7 +178,9 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
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' }})"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user