From 8c59c2b238f00f61ae27b8358b0a33217e1d022f Mon Sep 17 00:00:00 2001 From: dhritinaidu Date: Tue, 16 Jul 2024 17:00:32 -0400 Subject: [PATCH] trying make lint --- .github/workflows/test.yml | 27 +++++++++++++++++++++++++++ Makefile | 8 ++++++++ go.mod | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4ce75cc --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Run lint & unit tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + name: "Run unit tests" + runs-on: [buildjet-2vcpu-ubuntu-2204-arm] + container: + image: ghcr.io/viamrobotics/ocean-prefilter:arm64 + options: --platform linux/arm64 + + steps: + - uses: actions/checkout@v4 + + + + - name: Run lint + run: | + make lint + + - name: Run unit tests + run: make test \ No newline at end of file diff --git a/Makefile b/Makefile index 9b8e911..5b411fa 100644 --- a/Makefile +++ b/Makefile @@ -73,3 +73,11 @@ docker-amd64-ci: test: go test ./oceanprefilter + +# Docker image and container details +DOCKER_IMAGE := ghcr.io/viamrobotics/ocean-prefilter:arm64 + +# Lint rule +lint: + golangci-lint run + diff --git a/go.mod b/go.mod index f56ac57..a1363ce 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/viamrobotics/ocean-prefilter -go 1.21 +go 1.21.7 toolchain go1.21.12