-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
787 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,36 +31,29 @@ jobs: | |
go-version: '^1.20' | ||
cache-dependency-path: "**/*.sum" | ||
|
||
- name: Set Pact Standalone version | ||
run: | | ||
echo "pact_version=1.88.82" >> $GITHUB_ENV | ||
- name: Cache Pact | ||
- name: Cache pact | ||
id: cache-pact | ||
uses: actions/[email protected] | ||
with: | ||
path: ./pact/ | ||
path: /tmp/pact-lib | ||
key: ${{ runner.os }}-pact-${{ env.pact_version }} | ||
|
||
- name: Add Pact to Path | ||
if: steps.cache-pact.outputs.cache-hit == 'true' | ||
run: | | ||
echo "$PWD/pact/bin" >> $GITHUB_PATH | ||
- name: Download pact tools | ||
- name: Download pact | ||
if: steps.cache-pact.outputs.cache-hit != 'true' | ||
run: | | ||
curl -LO https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v${{ env.pact_version }}/pact-${{ env.pact_version }}-linux-x86_64.tar.gz | ||
tar xzf pact-${{ env.pact_version }}-linux-x86_64.tar.gz | ||
echo "$PWD/pact/bin" >> $GITHUB_PATH | ||
go install github.com/pact-foundation/pact-go/v2 | ||
mkdir /tmp/pact-lib | ||
pact-go -l DEBUG -d /tmp/pact-lib install | ||
- name: Run tests and generate coverage report | ||
run: | | ||
sudo mv /tmp/pact-lib/libpact_ffi.so /usr/local/lib | ||
make go-test | ||
- name: Publish pacts | ||
run: | | ||
pact-broker publish ./pacts \ | ||
docker run --rm -v $(pwd)/pacts:/tmp/pacts pactfoundation/pact-cli:latest \ | ||
pact-broker publish /tmp/pacts \ | ||
--consumer-app-version ${{ inputs.commit_sha }} \ | ||
--branch ${{ inputs.branch }} \ | ||
--tag ${{ inputs.tag }} \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.