| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| # Docker Compose override for coverage collection. |
| # Activated by: ./scripts/run-bdd-tests.sh --coverage <sdk> |
| # |
| # Mounts a shared ../reports volume into each BDD container and overrides |
| # the test command with the SDK-specific coverage-instrumented variant. |
| |
| services: |
| rust-bdd: |
| volumes: |
| - ../reports:/reports |
| command: |
| - sh |
| - -c |
| - | |
| rustup component add llvm-tools-preview \ |
| && cargo install cargo-llvm-cov \ |
| && case "$$BDD_FEATURE" in |
| basic_messaging) cargo llvm-cov test -p bdd --features bdd --test basic_messaging --lcov --output-path /reports/rust-bdd-coverage.lcov ;; |
| leader_redirection) cargo llvm-cov test -p bdd --features bdd --test leader_redirection --lcov --output-path /reports/rust-bdd-coverage.lcov ;; |
| *) cargo llvm-cov test -p bdd --features bdd --lcov --output-path /reports/rust-bdd-coverage.lcov ;; |
| esac |
| |
| python-bdd: |
| volumes: |
| - ../reports:/reports |
| command: |
| - sh |
| - -c |
| - >- |
| uv run --project /workspace/bdd/python |
| pytest tests/ -v |
| --cov --cov-report=xml:/reports/python-bdd-coverage.xml |
| |
| php-bdd: |
| volumes: |
| - ../reports:/reports |
| command: |
| - bash |
| - -lc |
| - >- |
| cd /workspace/foreign/php |
| && source <(cargo llvm-cov show-env --sh) |
| && export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR |
| && cargo llvm-cov clean --workspace |
| && cargo php install --yes |
| && ./scripts/test.sh --configuration /workspace/bdd/php/phpunit.xml.dist |
| && cargo llvm-cov report --lcov |
| --ignore-filename-regex='(\.cargo/|/rustc/|/core/)' |
| --output-path /reports/php-bdd-coverage.lcov |
| |
| go-bdd: |
| volumes: |
| - ../reports:/reports |
| command: |
| - sh |
| - -c |
| - >- |
| go test -v |
| -coverpkg=github.com/apache/iggy/foreign/go/... |
| -coverprofile=/reports/go-bdd-coverage.out |
| ./... |
| |
| node-bdd: |
| user: "0" |
| volumes: |
| - ../reports:/reports |
| command: |
| - sh |
| - -c |
| - npx c8 --reporter=lcov --reports-dir=/reports/node-bdd-coverage npm run test:bdd |
| |
| csharp-bdd: |
| volumes: |
| - ../reports:/reports |
| command: |
| - sh |
| - -c |
| - | |
| FILTER="" |
| case "$$BDD_FEATURE" in |
| basic_messaging) FILTER='--filter-trait Category=basic-messaging' ;; |
| leader_redirection) FILTER='--filter-trait Category=requires-leader-awareness' ;; |
| esac |
| dotnet test $$FILTER --coverage --coverage-output-format cobertura --coverage-output csharp-bdd-coverage.cobertura.xml --results-directory /reports |
| |
| java-bdd: |
| volumes: |
| - ../reports:/reports |
| command: |
| - sh |
| - -c |
| - >- |
| gradle --no-daemon test jacocoTestReport |
| && cp build/reports/jacoco/test/jacocoTestReport.xml /reports/java-bdd-coverage.xml |