From ead284e20b29c96052ab5ec18c3022aa50f1c7ac Mon Sep 17 00:00:00 2001 From: John Guo Date: Wed, 11 May 2022 13:58:04 +0800 Subject: [PATCH] workflow updates --- .github/workflows/gf.yml | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/gf.yml b/.github/workflows/gf.yml index 46649f814..4d8b037b4 100644 --- a/.github/workflows/gf.yml +++ b/.github/workflows/gf.yml @@ -23,9 +23,9 @@ jobs: code-test: runs-on: ubuntu-latest - # Service containers to run with `code-test` services: + # Redis backend server. redis: image : redis options: >- @@ -37,6 +37,7 @@ jobs: # Maps tcp port 6379 on service container to the host - 6379:6379 + # MySQL backend server. mysql: image: mysql:5.7 env: @@ -46,6 +47,7 @@ jobs: # Maps tcp port 3306 on service container to the host - 3306:3306 + # PostgreSQL backend server. postgres: image: postgres:13 env: @@ -62,6 +64,7 @@ jobs: --health-timeout 5s --health-retries 5 + # MSSQL backend server. mssql: image: mcmoe/mssqldocker:latest env: @@ -79,6 +82,7 @@ jobs: --health-timeout 5s --health-retries 10 + # ClickHouse backend server. clickhouse-server: image: yandex/clickhouse-server ports: @@ -87,7 +91,6 @@ jobs: - 9001:9001 - # strategy set strategy: matrix: go: ["1.15", "1.16", "1.17"] @@ -120,7 +123,7 @@ jobs: go mod tidy go build ./... GOARCH=386 go test ./... || exit 1 - GOARCH=amd64 go test ./... -race -coverprofile=coverage.txt -covermode=atomic || exit 1 + GOARCH=amd64 go test ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./...,github.com/gogf/gf/v2/... || exit 1 - name: Example Build & Test run: | @@ -128,7 +131,7 @@ jobs: go mod tidy go build ./... GOARCH=386 go test ./... || exit 1 - GOARCH=amd64 go test ./... -race -coverprofile=coverage.txt -covermode=atomic || exit 1 + GOARCH=amd64 go test ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./...,github.com/gogf/gf/v2/... || exit 1 - name: Contrib Build & Test run: | @@ -143,7 +146,7 @@ jobs: go mod tidy go build ./... GOARCH=386 go test ./... || exit 1 - GOARCH=amd64 go test ./... -race -coverprofile=coverage.txt -covermode=atomic || exit 1 + GOARCH=amd64 go test ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./...,github.com/gogf/gf/v2/... || exit 1 cd - done @@ -151,17 +154,17 @@ jobs: run: | go build ./... GOARCH=386 go test -v ./... || exit 1 - GOARCH=amd64 go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic || exit 1 + GOARCH=amd64 go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./...,github.com/gogf/gf/v2/... || exit 1 - - name: Merge Coverage - run: | - for file in `find . -name coverage.txt`; do - # In case of recursively incremental selffile in root directory. - if [ "./coverage.txt" = $file ]; then - continue 1 - fi - cat $file >> coverage.txt - done +# - name: Merge Coverage +# run: | +# for file in `find . -name coverage.txt`; do +# # In case of recursively incremental selffile in root directory. +# if [ "./coverage.txt" = $file ]; then +# continue 1 +# fi +# cat $file >> coverage.txt +# done - name: Report Coverage uses: codecov/codecov-action@v2