-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update deps + optimize CI (#119)
* feat: update deps Signed-off-by: Martin Chodur <[email protected]> * fix: changelog Signed-off-by: Martin Chodur <[email protected]> * fix: limit GOMAXPROCS and GOMEMLIMIT for lint in CI Signed-off-by: Martin Chodur <[email protected]> * fix: optimise CI Signed-off-by: Martin Chodur <[email protected]> * fix: ci Signed-off-by: Martin Chodur <[email protected]> * fix: drop make format Signed-off-by: Martin Chodur <[email protected]> * fix: ci Signed-off-by: Martin Chodur <[email protected]> --------- Signed-off-by: Martin Chodur <[email protected]>
- Loading branch information
Showing
5 changed files
with
110 additions
and
106 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 |
---|---|---|
@@ -1,29 +1,28 @@ | ||
version: 2.1 | ||
orbs: | ||
go: circleci/[email protected] | ||
|
||
defaults: &defaults | ||
docker: | ||
- image: cimg/go:1.23 | ||
resource_class: small | ||
executor: | ||
name: go/default # Use the default executor from the orb | ||
tag: "1.23" | ||
|
||
version: 2 | ||
jobs: | ||
lint: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: make lint | ||
|
||
check_format: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: | | ||
make format | ||
git diff --color --exit-code | ||
- checkout # checkout source code | ||
- go/load-cache # Load cached Go modules. | ||
- run: GOMAXPROCS=1 GOMEMLIMIT=1750MiB make lint | ||
- go/save-cache # Save Go modules to cache. | ||
|
||
test: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- checkout # checkout source code | ||
- go/load-cache # Load cached Go modules. | ||
- run: make test-and-coverage | ||
- go/save-cache # Save Go modules to cache. | ||
|
||
test-release: | ||
<<: *defaults | ||
|
@@ -35,8 +34,10 @@ jobs: | |
build: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- checkout # checkout source code | ||
- go/load-cache # Load cached Go modules. | ||
- run: make build | ||
- go/save-cache # Save Go modules to cache. | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
|
@@ -54,7 +55,8 @@ jobs: | |
release: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- checkout # checkout source code | ||
- go/load-cache # Load cached Go modules. | ||
- setup_remote_docker | ||
- run: | | ||
echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USER}" --password-stdin | ||
|
@@ -65,7 +67,6 @@ workflows: | |
slo-exporter: | ||
jobs: | ||
- lint | ||
- check_format | ||
- test | ||
- test-release: | ||
filters: | ||
|
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
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ TMP_BIN_DIR ?= $(TMP_DIR)/bin | |
GORELEASER_VERSION ?= v2.4.4 | ||
|
||
.PHONY: all | ||
all: format lint test-and-coverage build test-release | ||
all: lint test-and-coverage build test-release | ||
|
||
$(TMP_DIR): | ||
mkdir -p $(TMP_DIR) | ||
|
@@ -31,11 +31,6 @@ golangci-lint: | |
@echo "Downloading golangci-lint..." | ||
go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
|
||
.PHONY: format | ||
format: | ||
go mod tidy | ||
go fmt ./... | ||
|
||
.PHONY: lint | ||
lint: golangci-lint | ||
golangci-lint run --timeout 10m | ||
|
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.