Skip to content

Commit 9c957d3

Browse files
committed
fix: only run tests on crates containing tracing integration tests
1 parent ada2860 commit 9c957d3

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
CARGO_INCREMENTAL: 0
8080
PACKAGES: ${{ needs.setup.outputs.packages }}
8181
CRASHTRACKER_FEATURE: ${{ needs.setup.outputs.crashtracker-feature }}
82+
TRACING_CRATES: "libdd-data-pipeline libdd-trace-utils datadog-tracer-flare"
8283
strategy:
8384
matrix:
8485
platform: [windows-latest, ubuntu-latest, macos-15]
@@ -152,10 +153,23 @@ jobs:
152153
run: |
153154
if [[ -z "$PACKAGES" ]]; then
154155
# shellcheck disable=SC2086
155-
cargo nextest run --workspace $CRASHTRACKER_FEATURE --exclude builder --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'
156+
for crate in $TRACING_CRATES; do
157+
PACKAGES="$PACKAGES -p $crate"
158+
done
159+
cargo nextest run $PACKAGES --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'
156160
else
157-
# shellcheck disable=SC2086
158-
cargo nextest run $PACKAGES $CRASHTRACKER_FEATURE --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'
161+
TRACING_PACKAGES=""
162+
for crate in $TRACING_CRATES; do
163+
if echo "$PACKAGES" | grep -qw -- "-p $crate"; then
164+
TRACING_PACKAGES="$TRACING_PACKAGES -p $crate"
165+
fi
166+
done
167+
if [[ -z "$TRACING_PACKAGES" ]]; then
168+
echo "No tracing integration test crates found in PACKAGES, skipping."
169+
else
170+
# shellcheck disable=SC2086
171+
cargo nextest run $TRACING_PACKAGES --profile ci --test-threads=1 --verbose -E 'test(tracing_integration_tests::)'
172+
fi
159173
fi
160174
env:
161175
RUST_BACKTRACE: full

0 commit comments

Comments
 (0)