Skip to content

Commit

Permalink
Improve makefile targets and target names
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-congo committed Feb 22, 2024
1 parent e223baf commit 6ae23a1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ jobs:
working-directory: ./go
run: make lint

- name: Run unit tests
- name: Run tests
working-directory: ./go
run: make unit-test-report
run: make test-and-report

- name: Upload test reports
if: always()
Expand All @@ -94,7 +94,7 @@ jobs:
with:
name: test-reports-go-${{ matrix.go }}-redis-${{ matrix.redis }}-${{ matrix.os }}
path: |
go/reports/unit-test-report.html
go/reports/test-report.html
build-amazonlinux-latest:
if: github.repository_owner == 'aws'
Expand Down Expand Up @@ -164,17 +164,17 @@ jobs:
working-directory: ./go
run: make lint

- name: Run unit tests
- name: Run tests
working-directory: ./go
run: make unit-test-report
run: make test-and-report

- name: Upload test reports
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: test-reports-go-${{ matrix.go }}-amazon-linux-latest
path: go/reports/unit-test-report.html
path: go/reports/test-report.html

lint-rust:
timeout-minutes: 15
Expand Down
26 changes: 17 additions & 9 deletions go/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
install-tools-go1.18:
go install github.com/vakenbolt/[email protected]
install-build-tools:
go install google.golang.org/protobuf/cmd/[email protected]

install-dev-tools-go1.18:
go install github.com/vakenbolt/[email protected]
go install mvdan.cc/[email protected]
go install github.com/segmentio/[email protected]
go install honnef.co/go/tools/cmd/[email protected]

install-tools:
install-dev-tools:
go install github.com/vakenbolt/[email protected]
go install google.golang.org/protobuf/cmd/[email protected]
go install mvdan.cc/[email protected]
go install github.com/segmentio/[email protected]
go install honnef.co/go/tools/cmd/[email protected]
go install mvdan.cc/[email protected]
go install github.com/segmentio/[email protected]
go install honnef.co/go/tools/cmd/[email protected]

install-tools-go1.18: install-build-tools install-dev-tools-go1.18

install-tools: install-build-tools install-dev-tools

build: build-glide-core build-glide-client generate-protobuf
go build ./...
Expand Down Expand Up @@ -41,6 +46,9 @@ format:
gofumpt -w .
golines -w --shorten-comments -m 127 .

unit-test-report:
test:
go test -race ./...

test-and-report:
mkdir -p reports
go test -race ./... -json | go-test-report -o reports/unit-test-report.html
go test -race ./... -json | go-test-report -o reports/test-report.html

0 comments on commit 6ae23a1

Please sign in to comment.