75f3dd141c
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CI and Release / lint-frontend (push) Has been cancelled
CI and Release / dockerfile-scan (push) Has been cancelled
CI and Release / test-frontend (push) Has been cancelled
CI and Release / lint-verification-agent (push) Has been cancelled
CI and Release / test-verification-agent (push) Has been cancelled
CI and Release / e2e-verification-agent (push) Has been cancelled
CI and Release / test-backend (push) Has been cancelled
CI and Release / build-dev-image (push) Has been cancelled
CI and Release / push-dev-image (push) Has been cancelled
CI and Release / build-image (push) Has been cancelled
CI and Release / build-verification-image (push) Has been cancelled
CI and Release / determine-version (push) Has been cancelled
CI and Release / push-image (push) Has been cancelled
CI and Release / push-verification-image (12) (push) Has been cancelled
CI and Release / lint-backend (push) Has been cancelled
CI and Release / push-verification-image (17) (push) Has been cancelled
CI and Release / push-verification-image (18) (push) Has been cancelled
CI and Release / release (push) Has been cancelled
CI and Release / publish-helm-chart (push) Has been cancelled
CI and Release / push-verification-image (13) (push) Has been cancelled
CI and Release / push-verification-image (14) (push) Has been cancelled
CI and Release / push-verification-image (15) (push) Has been cancelled
CI and Release / push-verification-image (16) (push) Has been cancelled
45 lines
1.2 KiB
Makefile
45 lines
1.2 KiB
Makefile
.PHONY: run build test lint e2e e2e-clean
|
|
|
|
-include .env
|
|
export
|
|
|
|
CLEAN_ARTIFACTS := rm -rf e2e/artifacts
|
|
DOWN_QUIET := cd e2e && docker compose down -v --remove-orphans 2>/dev/null
|
|
DOWN_CLEAN_QUIET := cd e2e && docker compose down -v --rmi local 2>/dev/null
|
|
|
|
run:
|
|
go run ./cmd run \
|
|
--databasus-host $(DATABASUS_URL) \
|
|
--agent-id $(AGENT_ID) \
|
|
--token $(AGENT_TOKEN) \
|
|
--max-cpu 4 \
|
|
--max-ram-mb 4096 \
|
|
--max-disk-gb 1000 \
|
|
--max-concurrent-jobs 2 \
|
|
--allow-insecure-http \
|
|
--skip-update
|
|
|
|
build:
|
|
CGO_ENABLED=0 go build -ldflags "-X main.Version=$(VERSION)" -o databasus-verification-agent ./cmd
|
|
|
|
test:
|
|
go test -race -count=1 -failfast ./internal/...
|
|
|
|
lint:
|
|
golangci-lint fmt ./cmd/... ./internal/... ./e2e/... && golangci-lint run ./cmd/... ./internal/... ./e2e/...
|
|
|
|
e2e:
|
|
-$(DOWN_QUIET)
|
|
-$(CLEAN_ARTIFACTS)
|
|
cd e2e && docker compose build --no-cache e2e-mock-server
|
|
cd e2e && docker compose build
|
|
cd e2e && docker compose run --rm e2e-agent-builder
|
|
cd e2e && docker compose run --rm e2e-fixture-gen
|
|
cd e2e && docker compose up -d e2e-mock-server
|
|
cd e2e && docker compose run --rm e2e-agent-runner
|
|
cd e2e && docker compose down -v
|
|
|
|
e2e-clean:
|
|
-$(DOWN_CLEAN_QUIET)
|
|
-$(CLEAN_ARTIFACTS)
|