Skip to content

Commit

Permalink
Merge a5589b1 into 4948130
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Gelloz authored Jul 25, 2022
2 parents 4948130 + a5589b1 commit 7324b05
Show file tree
Hide file tree
Showing 9 changed files with 265 additions and 492 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build special named branch
name: Build and push special named branch
on:
push:
branches:
Expand All @@ -7,24 +7,25 @@ on:
- 'feat/**'
- 'fix/**'
- 'hotfix/**'

jobs:
BuildDockerImage:
name: 'Build & Publish Docker'
build-push:
name: 'Build & Push Docker image'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: "NumaryBot"
password: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,38 @@ on:

name: Main
jobs:
Test:
lint:
uses: numary/gh-workflows/.github/workflows/golang-lint.yml@main

test:
uses: numary/gh-workflows/.github/workflows/golang-test.yml@main
with:
go_version: 1.18

Build:
build:
uses: numary/gh-workflows/.github/workflows/goreleaser-build.yml@main
needs:
- Test
- lint
- test

build_docker:
name: 'Build & Publish Docker'
build-push:
name: 'Build & Push Docker image'
runs-on: ubuntu-latest
needs:
- Test
- lint
- test
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: "NumaryBot"
password: ${{ secrets.NUMARY_GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/pr_open.yml → .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@ on:
pull_request:
types: [assigned, opened, synchronize, reopened]
jobs:
Pr:
pr-style:
uses: numary/gh-workflows/.github/workflows/pr-style.yml@main

Test:
uses: numary/gh-workflows/.github/workflows/golang-test.yml@main
with:
go_version: 1.18

Lint:
lint:
uses: numary/gh-workflows/.github/workflows/golang-lint.yml@main
with:
go_version: 1.18

Build:
test:
uses: numary/gh-workflows/.github/workflows/golang-test.yml@main

build:
uses: numary/gh-workflows/.github/workflows/goreleaser-build.yml@main
needs:
- Test
- pr-style
- lint
- test
14 changes: 8 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@ on:
permissions:
contents: write
jobs:
Test:
lint:
uses: numary/gh-workflows/.github/workflows/golang-lint.yml@main

test:
uses: numary/gh-workflows/.github/workflows/golang-test.yml@main
with:
go_version: 1.18

Build:
build:
uses: numary/gh-workflows/.github/workflows/goreleaser-release.yml@main
secrets:
NUMARY_GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
needs:
- Test
- lint
- test

build_docker:
build-docker:
name: 'Build & Publish Docker'
runs-on: ubuntu-latest
steps:
Expand Down
15 changes: 12 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,27 @@ vars:
TIMEOUT: 10m

tasks:
tests:
default:
cmds:
- go test -v {{.FAILFAST}} -coverpkg {{.PKG}} -coverprofile {{.COVERAGE_FILE}} -covermode atomic -timeout {{.TIMEOUT}} {{.PKG}}
- task: lint
- task: tests

lint:
cmds:
- golangci-lint run -v --fix {{.PKG}}
- golangci-lint run -v --fix {{.PKG}}

tests:
cmds:
- go test -v {{.FAILFAST}} -coverpkg {{.PKG}} -coverprofile {{.COVERAGE_FILE}} -covermode atomic -timeout {{.TIMEOUT}} {{.PKG}}

build:
cmds:
- go build -o {{.BINARY_NAME}}

install:
cmds:
- go install -o {{.BINARY_NAME}}

clean:
cmds:
- go clean
Expand Down
125 changes: 56 additions & 69 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/numary/payments
go 1.18

require (
github.com/Shopify/sarama v1.32.0
github.com/Shopify/sarama v1.35.0
github.com/ThreeDotsLabs/watermill v1.1.1
github.com/bombsimon/logrusr/v3 v3.0.0
github.com/davecgh/go-spew v1.1.1
Expand All @@ -15,122 +15,109 @@ require (
github.com/pborman/uuid v1.2.1
github.com/pkg/errors v0.9.1
github.com/rs/cors v1.8.2
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.3.0
github.com/spf13/viper v1.10.1
github.com/stretchr/testify v1.7.1
github.com/stripe/stripe-go/v72 v72.107.0
github.com/uptrace/opentelemetry-go-extra/otellogrus v0.1.12
github.com/xdg-go/scram v1.1.0
go.mongodb.org/mongo-driver v1.9.1
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.28.0
go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.29.0
go.opentelemetry.io/otel v1.6.3
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.5.0
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.8.0
github.com/stripe/stripe-go/v72 v72.120.0
github.com/uptrace/opentelemetry-go-extra/otellogrus v0.1.14
github.com/xdg-go/scram v1.1.1
go.mongodb.org/mongo-driver v1.10.0
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.33.0
go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.33.0
go.opentelemetry.io/otel v1.8.0
go.uber.org/dig v1.14.1
go.uber.org/fx v1.17.1
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
)

require (
cloud.google.com/go v0.99.0 // indirect
cloud.google.com/go/storage v1.18.2 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/ThreeDotsLabs/watermill-http v1.1.4 // indirect
github.com/ThreeDotsLabs/watermill-kafka/v2 v2.2.1 // indirect
github.com/ThreeDotsLabs/watermill-kafka/v2 v2.2.2 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect
github.com/cncf/xds/go v0.0.0-20211216145620-d92e9ce0af51 // indirect
github.com/containerd/continuity v0.2.2 // indirect
github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/eapache/go-resiliency v1.2.0 // indirect
github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/envoyproxy/go-control-plane v0.10.1 // indirect
github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-chi/chi v4.0.2+incompatible // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-chi/chi v4.1.2+incompatible // indirect
github.com/go-chi/render v1.0.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720 // indirect
github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.0.0 // indirect
github.com/jcmturner/gofork v1.1.0 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/klauspost/compress v1.14.4 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/lib/pq v1.10.5 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/montanaflynn/stats v0.6.6 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.0 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/pierrec/lz4/v4 v4.1.15 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/spf13/afero v1.7.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/uptrace/opentelemetry-go-extra/otelutil v0.1.12 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/uptrace/opentelemetry-go-extra/otelutil v0.1.14 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
go.opencensus.io v0.23.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.5.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.5.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.5.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.5.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.5.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.5.0 // indirect
go.opentelemetry.io/otel/sdk v1.5.0 // indirect
go.opentelemetry.io/otel/trace v1.6.3 // indirect
go.opentelemetry.io/proto/otlp v0.12.0 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
go.opentelemetry.io/contrib/instrumentation/github.com/Shopify/sarama/otelsarama v0.33.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.8.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.8.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.8.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.8.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.8.0 // indirect
go.opentelemetry.io/otel/sdk v1.8.0 // indirect
go.opentelemetry.io/otel/trace v1.8.0 // indirect
go.opentelemetry.io/proto/otlp v0.18.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0 // indirect
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/api v0.63.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb // indirect
google.golang.org/grpc v1.45.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252 // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools v2.2.0+incompatible // indirect
)
Loading

0 comments on commit 7324b05

Please sign in to comment.