Skip to content

Commit

Permalink
Docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
mantzas committed Oct 13, 2024
1 parent 29bf674 commit 998a158
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,23 @@ on:
branches:
- master
pull_request:

jobs:
lint:
name: Lint and fmt check
runs-on: self-hosted
steps:
- name: Check out source code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- name: Linting and fmt check
run: make lint

build:
name: CI
runs-on: ubuntu-latest
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
VERSION?="0.0.1"
DOCKER = docker

default: test

Expand All @@ -21,18 +20,18 @@ fmtcheck:
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"

lint: fmtcheck
$(DOCKER) run --env=GOFLAGS=-mod=vendor --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:v1.61.0 golangci-lint -v run
docker run --env=GOFLAGS=-mod=vendor --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:v1.61.0 golangci-lint -v run

deeplint: fmtcheck
$(DOCKER) run --env=GOFLAGS=-mod=vendor --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:v1.61.0 golangci-lint run --exclude-use-default=false --enable-all -D dupl --build-tags integration
docker run --env=GOFLAGS=-mod=vendor --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:v1.61.0 golangci-lint run --exclude-use-default=false --enable-all -D dupl --build-tags integration

deps-start:
docker compose up -d

deps-stop:
docker compose down

ci: fmtcheck lint deps
ci: fmtcheck
go test ./... -race -cover -tags=integration -coverprofile=coverage.txt -covermode=atomic

# disallow any parallelism (-j) for Make. This is necessary since some
Expand Down

0 comments on commit 998a158

Please sign in to comment.