Skip to content

Commit

Permalink
ci: Fix rate limiting error when downloading contract tests (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 committed May 10, 2024
1 parent fa9c289 commit e4692d9
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
17 changes: 15 additions & 2 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ inputs:
description: 'Which ghc version to use when building the package'
required: false
default: 8.10.7
token:
description: 'GH token used to download SDK test harness.'
required: true
outputs:
package-hashes:
description: "base64-encoded sha256 hashes of distribution files"
Expand Down Expand Up @@ -45,6 +48,16 @@ runs:
shell: bash
run: stack --no-terminal --resolver=${{ inputs.resolver }} test

- name: Run contract tests
- name: Build contract tests
shell: bash
run: STACKOPTS='--no-terminal --resolver=${{ inputs.resolver }}' make contract-tests
run: STACKOPTS='--no-terminal --resolver=${{ inputs.resolver }}' make build-contract-tests

- name: Start contract test service
shell: bash
run: STACKOPTS='--no-terminal --resolver=${{ inputs.resolver }}' make start-contract-test-service-bg

- uses: launchdarkly/gh-actions/actions/contract-tests@contract-tests-v1.0.2
with:
test_service_port: 8000
token: ${{ inputs.token }}
extra_params: "-skip-from contract-tests/testharness-suppressions.txt"
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
with:
resolver: ${{ matrix.resolver }}
ghc-version: ${{ matrix.ghc-version }}
token: ${{ secrets.GITHUB_TOKEN }}

build-macosx:
runs-on: macos-latest
Expand All @@ -58,7 +59,12 @@ jobs:
fetch-depth: 0 # If you only need the current version keep this.

- name: Install os dependencies
run: brew install pcre
run: brew install pcre llvm@13

- name: Setup compilation environment
run: |
echo "C_INCLUDE_PATH=$(find /opt/homebrew/Cellar/pcre -name 'pcre.h' -exec dirname {} \;):$(xcrun --show-sdk-path)/usr/include/ffi" >> $GITHUB_ENV
echo "PATH=/opt/homebrew/opt/llvm@13/bin:$PATH" >> $GITHUB_ENV
- uses: ./.github/actions/setup-cache
with:
Expand All @@ -68,6 +74,7 @@ jobs:
with:
resolver: ${{ matrix.resolver }}
ghc-version: ${{ matrix.ghc-version }}
token: ${{ secrets.GITHUB_TOKEN }}

quality-checks:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/manual-publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:

- name: Build and Test
uses: ./.github/actions/ci
with:
token: ${{secrets.GITHUB_TOKEN}}

- name: Build docs
uses: ./.github/actions/build-docs
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- name: Build and Test
id: ci
uses: ./.github/actions/ci
with:
token: ${{secrets.GITHUB_TOKEN}}

- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.0
name: 'Get Hackage token'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
- uses: ./.github/actions/ci
id: ci
if: ${{ steps.release.outputs.releases_created }}
with:
token: ${{secrets.GITHUB_TOKEN}}

- uses: ./.github/actions/build-docs
if: ${{ steps.release.outputs.releases_created }}
Expand Down

0 comments on commit e4692d9

Please sign in to comment.