summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-08 18:34:04 +0300
committerValery Piashchynski <[email protected]>2020-12-08 18:34:04 +0300
commitb02c426b72ed9f36441dbf8dff6553b0d027980d (patch)
tree02f34c5d75a28859f2ce4e00ceacfbc8b4b537d6 /.github
parentaf1976961206099d5887be5f7ae1a465aa695f8e (diff)
Update golang tests in CI
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml37
1 files changed, 20 insertions, 17 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 92b55666..7daa44cc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -12,8 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- php: ['7.3', '7.4', '8.0']
- setup: [basic, lowest]
+ php: [ '7.3', '7.4', '8.0' ]
+ setup: [ basic, lowest ]
steps:
- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2 # action page: <https://github.com/shivammathur/setup-php>
@@ -59,8 +59,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- php: ['7.3', '7.4', '8.0']
- go: ['1.14', '1.15']
+ php: [ '7.3', '7.4', '8.0' ]
+ go: [ '1.14', '1.15' ]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2 # action page: <https://github.com/actions/setup-go>
@@ -102,19 +102,22 @@ jobs:
- name: Run golang tests
run: |
mkdir ./coverage-ci
- go test -race -v -covermode=atomic -coverprofile=./coverage-ci/lib.txt
- go test ./util -race -v -covermode=atomic -coverprofile=./coverage-ci/util.txt
- go test ./service -race -v -covermode=atomic -coverprofile=./coverage-ci/service.txt
- go test ./service/env -race -v -covermode=atomic -coverprofile=./coverage-ci/env.txt
- go test ./service/rpc -race -v -covermode=atomic -coverprofile=./coverage-ci/rpc.txt
- go test ./service/http -race -v -covermode=atomic -coverprofile=./coverage-ci/http.txt
- go test ./service/static -race -v -covermode=atomic -coverprofile=./coverage-ci/static.txt
- go test ./service/limit -race -v -covermode=atomic -coverprofile=./coverage-ci/limit.txt
- go test ./service/headers -race -v -covermode=atomic -coverprofile=./coverage-ci/headers.txt
- go test ./service/metrics -race -v -covermode=atomic -coverprofile=./coverage-ci/metrics.txt
- go test ./service/health -race -v -covermode=atomic -coverprofile=./coverage-ci/health.txt
- go test ./service/gzip -race -v -covermode=atomic -coverprofile=./coverage-ci/gzip.txt
- go test ./service/reload -race -v -covermode=atomic -coverprofile=./coverage-ci/reload.txt
+ go test -v -race -cover -tags=debug -coverprofile=lib.txt -covermode=atomic .
+ go test -v -race -cover -tags=debug -coverprofile=rpc_config.txt -covermode=atomic ./plugins/rpc
+ go test -v -race -cover -tags=debug -coverprofile=rpc.txt -covermode=atomic ./plugins/rpc/tests
+ go test -v -race -cover -tags=debug -coverprofile=plugin_config.txt -covermode=atomic ./plugins/config/tests
+ go test -v -race -cover -tags=debug -coverprofile=logger.txt -covermode=atomic ./plugins/logger/tests
+ go test -v -race -cover -tags=debug -coverprofile=server.txt -covermode=atomic ./plugins/server/tests
+ go test -v -race -cover -tags=debug -coverprofile=metrics.txt -covermode=atomic ./plugins/metrics/tests
+ go test -v -race -cover -tags=debug -coverprofile=informer.txt -covermode=atomic ./plugins/informer/tests
+ go test -v -race -cover -tags=debug -coverprofile=informer.txt -covermode=atomic ./plugins/resetter/tests
+ go test -v -race -cover -tags=debug -coverprofile=attributes.txt -covermode=atomic ./plugins/http/attributes
+ go test -v -race -cover -tags=debug -coverprofile=http_tests.txt -covermode=atomic ./plugins/http/tests
+ go test -v -race -cover -tags=debug -coverprofile=gzip.txt -covermode=atomic ./plugins/gzip/tests
+ go test -v -race -cover -tags=debug -coverprofile=static.txt -covermode=atomic ./plugins/static/tests
+ go test -v -race -cover -tags=debug -coverprofile=static_root.txt -covermode=atomic ./plugins/static
+ go test -v -race -cover -tags=debug -coverprofile=headers.txt -covermode=atomic ./plugins/headers/tests
+ go test -v -race -cover -tags=debug -coverprofile=checker.txt -covermode=atomic ./plugins/checker/tests
cat ./coverage-ci/*.txt > ./coverage-ci/summary.txt
- uses: codecov/codecov-action@v1 # Docs: <https://github.com/codecov/codecov-action>