Skip to content

Commit

Permalink
Merge branch 'master' into retrymode
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavanki authored May 15, 2024
2 parents 8aacc0b + cb4ed78 commit 7253b65
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 6 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ jobs:
exit 1
fi
coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22.x"

- name: Run coverage
run: make coverage

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: segmentio/chamber

dist:
strategy:
matrix:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*~
*.sw[a-z]
dist/
/chamber
/coverage.out
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.2-alpine AS build
FROM golang:1.22.3-alpine AS build

WORKDIR /go/src/github.com/segmentio/chamber
COPY . .
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ SRC := $(shell find . -name '*.go')
test: store/awsapi_mock.go
go test -v ./...

.PHONY: coverage
coverage:
go test -coverpkg ./... -coverprofile coverage.out ./...

store/awsapi_mock.go: store/awsapi.go
ifdef MOQ
rm -f $@
Expand All @@ -41,9 +45,12 @@ clean:
dist/:
mkdir -p dist

fmt:
go fmt ./...

build: chamber

chamber: $(SRC)
chamber: fmt $(SRC)
CGO_ENABLED=0 go build -trimpath $(LDFLAGS) -o $@

dist/chamber-$(VERSION)-darwin-amd64: | dist/
Expand All @@ -64,4 +71,4 @@ dist/chamber-$(VERSION)-linux-arm64 dist/chamber-$(VERSION)-linux-aarch64: | dis
dist/chamber-$(VERSION)-windows-amd64.exe: | dist/
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -trimpath $(LDFLAGS) -o $@

.PHONY: clean all linux
.PHONY: clean all fmt build linux
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/segmentio/analytics-go/v3 v3.3.0
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.9.0
golang.org/x/sys v0.19.0
golang.org/x/sys v0.20.0
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7253b65

Please sign in to comment.