From d3f7726ccb141fe1bf3ec0c750b79c66b7d9bb9d Mon Sep 17 00:00:00 2001 From: "Matthew M. Keeler" Date: Fri, 3 May 2024 10:38:43 -0400 Subject: [PATCH] ci: Fix rate limiting error when downloading contract tests (#274) --- .github/actions/ci/action.yml | 18 ++++++++++++++++-- .github/workflows/ci.yml | 2 ++ .github/workflows/manual-publish.yml | 2 +- .github/workflows/release-please.yml | 1 + 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/actions/ci/action.yml b/.github/actions/ci/action.yml index 599bb901..6be5bfc3 100644 --- a/.github/actions/ci/action.yml +++ b/.github/actions/ci/action.yml @@ -4,6 +4,9 @@ inputs: ruby-version: description: 'The version of ruby to setup and run' required: true + token: + description: 'GH token used to fetch the SDK test harness' + required: true runs: using: composite @@ -30,7 +33,18 @@ runs: shell: bash run: bundle exec rubocop --parallel - - name: Run contract tests + - name: Build contract tests + if: ${{ !startsWith(inputs.ruby-version, 'jruby') }} + shell: bash + run: make build-contract-tests + + - name: Start contract test service if: ${{ !startsWith(inputs.ruby-version, 'jruby') }} shell: bash - run: make contract-tests + run: make start-contract-test-service-bg + + - uses: launchdarkly/gh-actions/actions/contract-tests@contract-tests-v1.0.1 + if: ${{ !startsWith(inputs.ruby-version, 'jruby') }} + with: + test_service_port: 9000 + token: ${{ inputs.token }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c23038f1..24230501 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: LD_SKIP_DATABASE_TESTS: 0 strategy: + fail-fast: false matrix: ruby-version: - '3.0' @@ -46,6 +47,7 @@ jobs: - uses: ./.github/actions/ci with: ruby-version: ${{ matrix.ruby-version }} + token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/build-docs if: ${{ !startsWith(matrix.ruby-version, 'jruby') }} diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index 2d2c6097..4d1f55bc 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -30,6 +30,7 @@ jobs: uses: ./.github/actions/ci with: ruby-version: 3.0 + token: ${{ secrets.GITHUB_TOKEN }} - id: publish name: Publish Package @@ -47,4 +48,3 @@ jobs: with: base64-subjects: "${{ needs.build-publish.outputs.gem-hash }}" upload-assets: ${{ !inputs.dry_run }} - \ No newline at end of file diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 0ebfee24..def8b0f3 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -40,6 +40,7 @@ jobs: if: ${{ steps.release.outputs.releases_created }} with: ruby-version: 3.0 + token: ${{ secrets.GITHUB_TOKEN }} - uses: ./.github/actions/build-docs if: ${{ steps.release.outputs.releases_created }}