Skip to content

Commit

Permalink
Adding Make and CI steps for testing integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Rican7 committed Apr 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent c5b2388 commit 03aedcf
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -41,6 +41,9 @@ jobs:
- name: Test
run: make test-with-coverage-profile

- name: Test Integrations
run: make test-integrations

- name: Send code coverage to coveralls
if: ${{ matrix.go == '1.22.x' }}
env:
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Define directories
ROOT_DIR ?= ${CURDIR}
TOOLS_DIR ?= ${ROOT_DIR}/tools
INTEGRATIONS_DIR ?= ${ROOT_DIR}/integrations

# Set a local GOBIN, since the default value can't be trusted
# (See https://github.com/golang/go/issues/23439)
@@ -50,6 +51,11 @@ test-with-coverage-formatted:
test-with-coverage-profile:
go test -covermode ${GO_TEST_COVERAGE_MODE} -coverprofile ${GO_TEST_COVERAGE_FILE_NAME} ./...

${INTEGRATIONS_DIR} test-integrations:
cd ${INTEGRATIONS_DIR} && go test -v ./...

test-all: test test-integrations

format-lint:
$(info ${GOBIN}/gofumpt -l ${GOFUMPT_FLAGS} .)
@errors=$$(${GOBIN}/gofumpt -l ${GOFUMPT_FLAGS} .); if [ "$${errors}" != "" ]; then echo "Format lint failed on:\n$${errors}\n"; exit 1; fi
@@ -70,4 +76,4 @@ fix: install-deps-dev format-fix
go fix ./...


.PHONY: all clean build install-deps tools install-deps-dev update-deps test test-with-coverage test-with-coverage-formatted test-with-coverage-profile format-lint style-lint lint vet format-fix fix
.PHONY: all clean build install-deps tools install-deps-dev update-deps test test-with-coverage test-with-coverage-formatted test-with-coverage-profile test-integrations test-all format-lint style-lint lint vet format-fix fix

0 comments on commit 03aedcf

Please sign in to comment.