From 8bd70c6f845d8ecdc83cadf8988a19289cfcf3e3 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Tue, 1 Feb 2022 06:32:26 -0800 Subject: [PATCH] (ci): Run go (build|test) commands for each module --- .github/workflows/build.yml | 13 +++++++++++-- tools/go.mod | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13b1a0a..5cf0593 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,12 +22,21 @@ jobs: with: go-version: ${{ matrix.go-version }} - - name: Build + - name: Build core module run: go build -v ./... - - name: Test + - name: Build x module + run: cd x && go build -v ./... && cd .. + + - name: Build tools module + run: cd tools && go build -v ./... && cd .. + + - name: Test core module run: go test -race -v -coverprofile=coverage.txt -covermode=atomic ./... + - name: Test x module + run: cd x && go test -race -v ./... && cd .. + - name: Benchmark Test run: go test -run=^$ -bench=. -loglevel=debug ./... diff --git a/tools/go.mod b/tools/go.mod index 1ae02fd..b82e351 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -9,6 +9,7 @@ require ( github.com/hibiken/asynq/x v0.0.0-20220131170841-349f4c50fb1d github.com/mitchellh/go-homedir v1.1.0 github.com/prometheus/client_golang v1.11.0 + github.com/spf13/afero v1.1.2 // indirect github.com/spf13/cobra v1.1.1 github.com/spf13/viper v1.7.0 )