Skip to content

Commit

Permalink
feat(contract-tests): allow passing branch independently of version (#41
Browse files Browse the repository at this point in the history
)
  • Loading branch information
cwaldren-ld authored Oct 1, 2024
1 parent 08907ed commit 7d4108a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion actions/contract-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
required: false
description: "Version of the test harness"
default: 'v2'
branch:
required: false
description: "Branch of the test harness"
default: 'v2'
test_service_port:
required: true
description: "Port of the component under test."
Expand Down Expand Up @@ -37,7 +41,7 @@ runs:
- name: 'Run Contract Tests'
shell: bash
run: |
curl ${{ inputs.token != '' && format('-H "Authorization: Token {0}"', inputs.token) || '' }} -s https://raw.githubusercontent.com/launchdarkly/${{ inputs.repo }}/${{ inputs.version }}/downloader/run.sh | bash
curl ${{ inputs.token != '' && format('-H "Authorization: Token {0}"', inputs.token) || '' }} -s https://raw.githubusercontent.com/launchdarkly/${{ inputs.repo }}/${{ inputs.branch }}/downloader/run.sh | bash
env:
# The token is directly used in the first curl command above to obtain the downloader script, to avoid rate limiting.
# The token is then passed to the downloader script itself, so it can perform more API requests and hopefully avoid rate limiting again.
Expand Down

0 comments on commit 7d4108a

Please sign in to comment.