Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Altinity/clickhouse-grafana into …
Browse files Browse the repository at this point in the history
…issue-330
  • Loading branch information
Slach committed Nov 20, 2024
2 parents 906e4a0 + 634da36 commit ff4d475
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ services:
if [[ "3" == `ls -la ./node_modules/ | wc -l` ]]; then npm install; fi && \
mkdir -p .nyc_output &&
cp tests/testflows/coverage/raw/* .nyc_output/ &&
npx nyc report --reporter=html --report-dir=./tests/testflows/frontend_coverage_testflows
cp coverage/coverage-final.json .nyc_output/ &&
npx nyc report --reporter=html --report-dir=./tests/testflows/coverage
'
Expand All @@ -216,7 +217,7 @@ services:
git config --global --add safe.directory /go/src/grafana-clickhouse &&
(command -v mage || go install -v github.com/magefile/mage@latest) &&
mkdir -p /go/src/grafana-clickhouse/coverage/raw &&
go test -timeout 1m -cover -failfast -tags=integration -run "${RUN_TESTS:-.+}" -v ./pkg/ -test.gocoverdir="/go/src/grafana-clickhouse/coverage/raw" &&
go test -timeout 1m -cover -failfast -tags=integration -run "${RUN_TESTS:-.+}" -v ./pkg/ -test.gocoverdir="/go/src/grafana-clickhouse/coverage" &&
GOOS=linux GOARCH=amd64 go build -cover -buildvcs=false -o ./dist/altinity-clickhouse-plugin_linux_amd64 ./pkg/ &&
chmod +x dist/altinity-clickhouse-plugin*
"
Expand All @@ -228,6 +229,11 @@ services:
- ./:/go/src/grafana-clickhouse
command: |
bash -xec "
go tool covdata textfmt -i=coverage/raw -o=coverage/coverage.txt &&
go tool cover -html=coverage/coverage.txt -o=coverage/coverage.html &&
mkdir -p ./tests/testflows/backend_coverage_testflows/
mv coverage/coverage.html ./tests/testflows/backend_coverage_testflows/ &&
mv coverage/covcounters* coverage/raw/ &&
go tool covdata textfmt -i=coverage/raw -o=coverage/coverage.txt &&
go tool cover -html=coverage/coverage.txt -o=coverage/coverage.html
"
Expand Down
5 changes: 4 additions & 1 deletion tests/testflows/infra/create-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ tfs --debug --no-colors report coverage - ./testflows_logs/raw.log - --confiden
mkdir code_coverage
mkdir code_coverage/backend
mkdir code_coverage/frontend
mkdir ./testflows_logs/frontend
cp -rfv coverage/* code_coverage/backend
cp -rfv tests/testflows/coverage/* code_coverage/frontend
cp -rfv tests/testflows/coverage/* code_coverage/frontend
cp -rfv tests/testflows/frontend_coverage_testflows/* ./testflows_logs/frontend
cp -rfv tests/testflows/backend_coverage_testflows/* ./testflows_logs/backend

0 comments on commit ff4d475

Please sign in to comment.