Initial release

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
2022-06-20 17:09:13 +01:00
parent d9d00cccc5
commit 2ffa757a67
6 changed files with 601 additions and 28 deletions

View File

@@ -1,49 +1,33 @@
.DEFAULT_GOAL := default
IMAGE ?= docker.cluster.fun/private/speedtest-exporter:latest
IMAGE ?= rg.fr-par.scw.cloud/averagemarcus/speedtest-exporter:latest
.PHONY: test # Run all tests, linting and format checks
test: lint check-format run-tests
.PHONY: lint # Perform lint checks against code
lint:
@echo "⚠️ 'lint' unimplemented"
# GO Projects
# @go vet && golint -set_exit_status ./...
@go vet && golint -set_exit_status ./...
.PHONY: check-format # Checks code formatting and returns a non-zero exit code if formatting errors found
check-format:
@echo "⚠️ 'check-format' unimplemented"
# GO Projects
# @gofmt -e -l .
@gofmt -e -l .
.PHONY: format # Performs automatic format fixes on all code
format:
@echo "⚠️ 'format' unimplemented"
# GO Projects
# @gofmt -s -w .
@gofmt -s -w .
.PHONY: run-tests # Runs all tests
run-tests:
@echo "⚠️ 'run-tests' unimplemented"
# GO Projects
# @go test
# Node Projects
# @npm test
@go test
.PHONY: fetch-deps # Fetch all project dependencies
fetch-deps:
@echo "⚠️ 'fetch-deps' unimplemented"
# GO Projects
# @go mod tidy
# Node Projects
# @npm install
@go mod tidy
.PHONY: build # Build the project
build: lint check-format fetch-deps
@echo "⚠️ 'build' unimplemented"
# GO Projects
# @go build -o PROJECT_NAME main.go
@go build -o speedtest-exporter main.go
.PHONY: docker-build # Build the docker image
docker-build:
@@ -55,11 +39,7 @@ docker-publish:
.PHONY: run # Run the application
run:
@echo "⚠️ 'run' unimplemented"
# GO Projects
# @go run main.go
# Node Projects
# @npm start
@go run main.go
.PHONY: ci # Perform CI specific tasks to perform on a pull request
ci: