From 7d3cd64f1c0fad49dc966319771217760017e0c9 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 1 Nov 2023 15:22:37 +0800 Subject: [PATCH] workflows: update the flag for the test commands (#13) Add -gcflags=-l flag for testing becase github.com/agiledragon/gomonkey is used in unit test. For detail: https://github.com/agiledragon/gomonkey/blob/v2.10.1/README.md#test-method --- .github/workflows/bigcache.yml | 2 ++ .github/workflows/clickhouse.yml | 4 +++- .github/workflows/cos.yml | 4 +++- .github/workflows/goredis.yml | 4 +++- .github/workflows/gorm.yml | 2 ++ .github/workflows/hbase.yml | 4 +++- .github/workflows/kafka.yml | 2 ++ .github/workflows/mysql.yml | 4 +++- .github/workflows/timer.yml | 2 ++ 9 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bigcache.yml b/.github/workflows/bigcache.yml index 1591724..33c5c14 100644 --- a/.github/workflows/bigcache.yml +++ b/.github/workflows/bigcache.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - 'bigcache/**' + - '.github/workflows/bigcache.yml' push: paths: - 'bigcache/**' + - '.github/workflows/bigcache.yml' workflow_dispatch: permissions: contents: read diff --git a/.github/workflows/clickhouse.yml b/.github/workflows/clickhouse.yml index db025c1..8eb4335 100644 --- a/.github/workflows/clickhouse.yml +++ b/.github/workflows/clickhouse.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - 'clickhouse/**' + - '.github/workflows/clickhouse.yml' push: paths: - 'clickhouse/**' + - '.github/workflows/clickhouse.yml' workflow_dispatch: permissions: contents: read @@ -21,7 +23,7 @@ jobs: - name: Build run: cd clickhouse && go build -v ./... - name: Test - run: cd clickhouse && go test -v -coverprofile=coverage.out ./... + run: cd clickhouse && go test -v -coverprofile=coverage.out -gcflags=all=-l ./... - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/cos.yml b/.github/workflows/cos.yml index ce2e76b..71082b1 100644 --- a/.github/workflows/cos.yml +++ b/.github/workflows/cos.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - 'cos/**' + - '.github/workflows/cos.yml' push: paths: - 'cos/**' + - '.github/workflows/cos.yml' workflow_dispatch: permissions: contents: read @@ -21,7 +23,7 @@ jobs: - name: Build run: cd cos && go build -v ./... - name: Test - run: cd cos && go test -v -coverprofile=coverage.out ./... + run: cd cos && go test -v -coverprofile=coverage.out -gcflags=-l ./... - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/goredis.yml b/.github/workflows/goredis.yml index 2818945..83c9cff 100644 --- a/.github/workflows/goredis.yml +++ b/.github/workflows/goredis.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - 'goredis/**' + - '.github/workflows/goredis.yml' push: paths: - 'goredis/**' + - '.github/workflows/goredis.yml' workflow_dispatch: permissions: contents: read @@ -21,7 +23,7 @@ jobs: - name: Build run: cd goredis && go build -v ./... - name: Test - run: cd goredis && go test -v -coverprofile=coverage.out ./... + run: cd goredis && go test -v -coverprofile=coverage.out -gcflags=all=-l ./... - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/gorm.yml b/.github/workflows/gorm.yml index 056cd69..2e329c2 100644 --- a/.github/workflows/gorm.yml +++ b/.github/workflows/gorm.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - 'gorm/**' + - '.github/workflows/gorm.yml' push: paths: - 'gorm/**' + - '.github/workflows/gorm.yml' workflow_dispatch: permissions: contents: read diff --git a/.github/workflows/hbase.yml b/.github/workflows/hbase.yml index b5f06cc..1600252 100644 --- a/.github/workflows/hbase.yml +++ b/.github/workflows/hbase.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - 'hbase/**' + - '.github/workflows/hbase.yml' push: paths: - 'hbase/**' + - '.github/workflows/hbase.yml' workflow_dispatch: permissions: contents: read @@ -21,7 +23,7 @@ jobs: - name: Build run: cd hbase && go build -v ./... - name: Test - run: cd hbase && go test -v -coverprofile=coverage.out ./... + run: cd hbase && go test -v -coverprofile=coverage.out -gcflags=all=-l ./... - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/kafka.yml b/.github/workflows/kafka.yml index a6f94a2..08eb7a5 100644 --- a/.github/workflows/kafka.yml +++ b/.github/workflows/kafka.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - 'kafka/**' + - '.github/workflows/kafka.yml' push: paths: - 'kafka/**' + - '.github/workflows/kafka.yml' workflow_dispatch: permissions: contents: read diff --git a/.github/workflows/mysql.yml b/.github/workflows/mysql.yml index 253c6a9..79eac07 100644 --- a/.github/workflows/mysql.yml +++ b/.github/workflows/mysql.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - 'mysql/**' + - '.github/workflows/mysql.yml' push: paths: - 'mysql/**' + - '.github/workflows/mysql.yml' workflow_dispatch: permissions: contents: read @@ -21,7 +23,7 @@ jobs: - name: Build run: cd mysql && go build -v ./... - name: Test - run: cd mysql && go test -v -coverprofile=coverage.out ./... + run: cd mysql && go test -v -coverprofile=coverage.out -gcflags=all=-l ./... - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/timer.yml b/.github/workflows/timer.yml index 22d0042..47c56e6 100644 --- a/.github/workflows/timer.yml +++ b/.github/workflows/timer.yml @@ -3,9 +3,11 @@ on: pull_request: paths: - 'timer/**' + - '.github/workflows/timer.yml' push: paths: - 'timer/**' + - '.github/workflows/timer.yml' workflow_dispatch: permissions: contents: read