Skip to content

Commit

Permalink
Merge branch 'main' into docs/features
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc authored Dec 17, 2024
2 parents f3ba2fd + 78ddf60 commit 7c78d67
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
go-version: '^1.23.2'

- name: Install tools
run: make deps.install
run: make deps-tools

- name: Build
run: make build
Expand All @@ -31,7 +31,7 @@ jobs:
run: make lint

- name: Tidy dependencies
run: make deps.tidy
run: make deps-tidy

- name: Run tests
run: make test
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.15] - 2024-12-07

### Changed
Expand Down Expand Up @@ -111,6 +113,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add CIDR unmarshalling and validation
- Add autonomous systems to configuration

[Unreleased]: https://github.com/danroc/geoblock/compare/v0.1.15...HEAD
[0.1.15]: https://github.com/danroc/geoblock/compare/v0.1.14...v0.1.15
[0.1.14]: https://github.com/danroc/geoblock/compare/v0.1.13...v0.1.14
[0.1.13]: https://github.com/danroc/geoblock/compare/v0.1.12...v0.1.13
Expand Down
55 changes: 26 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,46 +26,43 @@ RESET := \033[0m
# =============================================================================

.PHONY: lint
lint: lint.lines lint.revive lint.sec lint.vet ## Run all linters
lint: lint-lines lint-revive lint-sec lint-vet ## Run all linters

.PHONY: lint.lines
lint.lines: ## Lint lines length
.PHONY: lint-lines
lint-lines: ## Lint lines length
golines -w -m 79 --base-formatter=gofumpt .

.PHONY: lint.revive
lint.revive: ## Run revive linter
.PHONY: lint-revive
lint-revive: ## Run revive linter
revive -config revive.toml ./...

.PHONY: lint.sec
lint.sec: ## Run gosec linter
gosec ./...
.PHONY: lint-sec
lint-sec: ## Run gosec linter
gosec --exclude-dir=internal/tools ./...

.PHONY: lint.vet
lint.vet: ## Run go-vet linter
.PHONY: lint-vet
lint-vet: ## Run go-vet linter
go vet ./...

# =============================================================================
# @Dependencies
# =============================================================================

.PHONY: deps.tidy
deps.tidy: ## Tidy up dependencies
.PHONY: deps-tidy
deps-tidy: ## Tidy up dependencies
go mod tidy

.PHONY: deps.update
deps.update: ## Update dependencies
.PHONY: deps-update
deps-update: ## Update dependencies
go get -u ./...

# We use the latest version of the tools since they cannot be automatically
# updated by Renovate. Once development dependencies are managed by `go tool`,
# we can remove this target and track the tools in the `go.mod` file.
.PHONY: deps.install
deps.install: ## Install development dependencies
.PHONY: deps-tools
deps-tools: ## Install development dependencies
go install github.com/boumenot/gocover-cobertura@latest
go install github.com/mgechev/revive@latest
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install github.com/segmentio/golines@latest
go install mvdan.cc/gofumpt@latest
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install github.com/mgechev/revive@latest
go install github.com/boumenot/gocover-cobertura@latest

# =============================================================================
# Directory Creation
Expand Down Expand Up @@ -95,19 +92,19 @@ docker: ## Build docker image
# =============================================================================

.PHONY: test
test: test.unit test.e2e ## Run all tests
test: test-unit test-e2e ## Run all tests

.PHONY: test.unit
test.unit: ## Run unit tests
.PHONY: test-unit
test-unit: ## Run unit tests
go test -coverprofile=coverage.out ./...

.PHONY: test.e2e
test.e2e: ## Run end-to-end tests
.PHONY: test-e2e
test-e2e: ## Run end-to-end tests
docker build -f tests/Dockerfile -t geoblock-tests .
docker run --rm geoblock-tests

.PHONY: test.coverage
test.coverage: test.unit ## Generate coverage report
.PHONY: test-coverage
test-coverage: test-unit ## Generate coverage report
gocover-cobertura < coverage.out > coverage.xml

# =============================================================================
Expand Down

0 comments on commit 7c78d67

Please sign in to comment.