Skip to content

Commit

Permalink
Update use of pact package
Browse files Browse the repository at this point in the history
  • Loading branch information
hawx committed Jan 30, 2024
1 parent 8c20a37 commit 0aa93ab
Show file tree
Hide file tree
Showing 7 changed files with 767 additions and 391 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/go-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,11 @@ 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
id: cache-pact
uses: actions/[email protected]
with:
path: ./pact/
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
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 /usr/local/lib
pact-go -l DEBUG install
- name: Run tests and generate coverage report
run: |
Expand Down
2 changes: 1 addition & 1 deletion cmd/mlpa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var Tag string

func main() {
ctx := context.Background()
logger := logging.New(os.Stdout, "opg-modernising-lpa")
logger := logging.New(os.Stdout, "opg-modernising-lpa2")

var (
appPublicURL = env.Get("APP_PUBLIC_URL", "http://localhost:5050")
Expand Down
27 changes: 26 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/gorilla/sessions v1.2.2
github.com/ministryofjustice/opg-go-common v0.0.0-20231128145056-24628fba649c
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/pact-foundation/pact-go v1.8.0
github.com/pact-foundation/pact-go/v2 v2.0.2
github.com/stretchr/testify v1.8.4
github.com/vektra/mockery/v2 v2.40.1
github.com/xeipuuv/gojsonschema v1.2.0
Expand All @@ -43,6 +43,12 @@ require (
)

require (
cloud.google.com/go v0.110.10 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.5 // indirect
cloud.google.com/go/storage v1.31.0 // indirect
github.com/aws/aws-sdk-go v1.44.298 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.16 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect
Expand All @@ -59,16 +65,24 @@ require (
github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/brunoscheufler/aws-ecs-metadata-go v0.0.0-20220812150832-b6b31c6eeeaf // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/chigopher/pathlib v0.19.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.2 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
Expand All @@ -77,10 +91,12 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jinzhu/copier v0.3.5 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand All @@ -93,16 +109,25 @@ require (
github.com/spf13/viper v1.15.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.14.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.149.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/protobuf v1.32.0 // indirect
Expand Down
Loading

0 comments on commit 0aa93ab

Please sign in to comment.