Skip to content

Commit

Permalink
Merge pull request #16 from lechnerc77/chore/dev-container
Browse files Browse the repository at this point in the history
chore: add devcontainer and Makefile
  • Loading branch information
ned1313 committed Jun 17, 2024
2 parents f0920ef + cd98e9b commit e2845e0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "terrahash - Development",
//https://mcr.microsoft.com/en-us/product/devcontainers/go/tags
"image": "mcr.microsoft.com/devcontainers/go:1.22-bullseye",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/terraform:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"golang.go",
"HashiCorp.terraform",
"ms-vscode.makefile-tools"
]
},
"codespaces": {}
},
"hostRequirements": {
"memory": "4gb"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
"remoteUser": "vscode"
}
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
default: build

SETENV=
ifeq ($(OS),Windows_NT)
SETENV=set
endif

build:
go build -v ./...

install: build
go install -v ./...

lint:
golangci-lint run

fmt:
gofmt -s -w -e .

test:
go test -v -cover -tags=all -timeout=300s -parallel=4 ./...

.PHONY: build install lint generate fmt test

0 comments on commit e2845e0

Please sign in to comment.