Skip to content

Commit 92a36e0

Browse files
authored
enhancement(ci): refactor logic for int test file path changes detection (vectordotdev#17725)
- The intent is to better be able to manage the file paths per integration, as they are contained in a specific place for that integration rather in one massive list.
1 parent 7d10fc9 commit 92a36e0

File tree

38 files changed

+413
-252
lines changed

38 files changed

+413
-252
lines changed

.github/workflows/changes.yml

Lines changed: 101 additions & 252 deletions
Large diffs are not rendered by default.

.github/workflows/integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
with:
3939
base_ref: ${{ github.event.pull_request.base.ref }}
4040
head_ref: ${{ github.event.pull_request.head.ref }}
41+
source: false
42+
int_tests: true
4143
secrets: inherit
4244

4345
# Calls the Integration Test workflow for each integration that was detected to have files changed that impact it.

scripts/integration/amqp/test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,13 @@ test_filter: '::amqp::'
55

66
matrix:
77
version: ['3.8']
8+
9+
# changes to these files/paths will invoke the integration test in CI
10+
# expressions are evaluated using https://github.com/micromatch/picomatch
11+
paths:
12+
- "src/amqp.rs"
13+
- "src/internal_events/amqp.rs"
14+
- "src/sinks/amqp/**"
15+
- "src/sources/amqp.rs"
16+
- "src/sources/util/**"
17+
- "src/sinks/util/**"

scripts/integration/appsignal/test.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ runner:
99

1010
matrix:
1111
version: [latest]
12+
13+
# changes to these files/paths will invoke the integration test in CI
14+
# expressions are evaluated using https://github.com/micromatch/picomatch
15+
paths:
16+
- "src/sinks/appsignal/**"
17+
- "src/sinks/util/**"

scripts/integration/aws/test.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,15 @@ env:
1717

1818
matrix:
1919
version: [latest]
20+
21+
# changes to these files/paths will invoke the integration test in CI
22+
# expressions are evaluated using https://github.com/micromatch/picomatch
23+
paths:
24+
- "src/aws_**"
25+
- "src/internal_events/aws_**"
26+
- "src/sources/aws_**"
27+
- "src/sources/util/**"
28+
- "src/sinks/aws_**"
29+
- "src/sinks/util/**"
30+
- "src/transforms/aws_**"
31+
- "scripts/integration/aws/**"

scripts/integration/axiom/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@ runner:
1212

1313
matrix:
1414
postgres: [13-alpine]
15+
16+
# changes to these files/paths will invoke the integration test in CI
17+
# expressions are evaluated using https://github.com/micromatch/picomatch
18+
paths:
19+
- "src/sinks/axiom.rs"
20+
- "src/sinks/util/**"
21+
- "scripts/integration/axiom/**"

scripts/integration/azure/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ env:
1010

1111
matrix:
1212
version: [3.14.0]
13+
14+
# changes to these files/paths will invoke the integration test in CI
15+
# expressions are evaluated using https://github.com/micromatch/picomatch
16+
paths:
17+
- "src/sinks/azure_**"
18+
- "src/sinks/util/**"
19+
- "scripts/integration/azure/**"

scripts/integration/clickhouse/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@ env:
88

99
matrix:
1010
version: ['19']
11+
12+
# changes to these files/paths will invoke the integration test in CI
13+
# expressions are evaluated using https://github.com/micromatch/picomatch
14+
paths:
15+
- "src/sinks/clickhouse/**"
16+
- "src/sinks/util/**"
17+
- "scripts/integration/clickhouse/**"

scripts/integration/databend/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ runner:
1111

1212
matrix:
1313
version: ['latest']
14+
15+
# changes to these files/paths will invoke the integration test in CI
16+
# expressions are evaluated using https://github.com/micromatch/picomatch
17+
paths:
18+
- "src/sinks/databend/**"
19+
- "src/sinks/util/**"
20+
- "scripts/integration/databend/**"

scripts/integration/datadog-agent/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ env:
1212

1313
matrix:
1414
version: ['7']
15+
16+
# changes to these files/paths will invoke the integration test in CI
17+
# expressions are evaluated using https://github.com/micromatch/picomatch
18+
paths:
19+
- "src/common/datadog.rs"
20+
- "src/internal_events/datadog_*"
21+
- "src/sources/datadog_agent/**"
22+
- "scripts/integration/datadog-agent/**"

scripts/integration/datadog-logs/test.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,12 @@ runner:
99

1010
matrix:
1111
version: [latest]
12+
13+
# changes to these files/paths will invoke the integration test in CI
14+
# expressions are evaluated using https://github.com/micromatch/picomatch
15+
paths:
16+
- "src/common/datadog.rs"
17+
- "src/internal_events/datadog_*"
18+
- "src/sinks/datadog/logs/**"
19+
- "src/sinks/util/**"
20+
- "scripts/integration/datadog-logs/**"

scripts/integration/datadog-metrics/test.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,12 @@ runner:
99

1010
matrix:
1111
version: [latest]
12+
13+
# changes to these files/paths will invoke the integration test in CI
14+
# expressions are evaluated using https://github.com/micromatch/picomatch
15+
paths:
16+
- "src/common/datadog.rs"
17+
- "src/internal_events/datadog_*"
18+
- "src/sinks/datadog/metrics/**"
19+
- "src/sinks/util/**"
20+
- "scripts/integration/datadog-metrics/**"

scripts/integration/datadog-traces/test.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@ env:
1313

1414
matrix:
1515
version: [latest]
16+
17+
# changes to these files/paths will invoke the integration test in CI
18+
# expressions are evaluated using https://github.com/micromatch/picomatch
19+
paths:
20+
- "src/common/datadog.rs"
21+
- "src/internal_events/datadog_*"
22+
- "src/sinks/datadog/**"
23+
- "src/sinks/util/**"
24+
- "scripts/integration/datadog-traces/**"

scripts/integration/dnstap/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ runner:
1212

1313
matrix:
1414
version: ['latest']
15+
16+
# changes to these files/paths will invoke the integration test in CI
17+
# expressions are evaluated using https://github.com/micromatch/picomatch
18+
paths:
19+
- "src/internal_events/dnstap.rs"
20+
- "src/sources/dnstap/**"
21+
- "src/sources/util/**"
22+
- "scripts/integration/dnstap/**"

scripts/integration/docker-logs/test.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ runner:
88

99
matrix:
1010
default: ["default"]
11+
12+
# changes to these files/paths will invoke the integration test in CI
13+
# expressions are evaluated using https://github.com/micromatch/picomatch
14+
paths:
15+
- "src/docker.rs"
16+
- "src/internal_events/docker_logs.rs"
17+
- "src/sources/docker_logs/**"
18+
- "src/sources/util/**"
19+
- "scripts/integration/docker-logs/**"

scripts/integration/elasticsearch/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@ env:
1212

1313
matrix:
1414
version: [7.13.1]
15+
16+
# changes to these files/paths will invoke the integration test in CI
17+
# expressions are evaluated using https://github.com/micromatch/picomatch
18+
paths:
19+
- "src/sinks/elasticsearch/**"
20+
- "src/sinks/util/**"
21+
- "scripts/integration/elasticsearch/**"

scripts/integration/eventstoredb/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ test_filter: '::eventstoredb_metrics::'
55

66
matrix:
77
version: [latest]
8+
9+
# changes to these files/paths will invoke the integration test in CI
10+
# expressions are evaluated using https://github.com/micromatch/picomatch
11+
paths:
12+
- "src/internal_events/eventstoredb_metrics.rs"
13+
- "src/sources/eventstoredb_metrics/**"
14+
- "src/sources/util/**"
15+
- "scripts/integration/eventstoredb/**"

scripts/integration/fluent/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ runner:
1010

1111
matrix:
1212
default: ["default"]
13+
14+
# changes to these files/paths will invoke the integration test in CI
15+
# expressions are evaluated using https://github.com/micromatch/picomatch
16+
paths:
17+
- "src/internal_events/fluent.rs"
18+
- "src/sources/fluent/**"
19+
- "src/sources/util/**"
20+
- "scripts/integration/fluent/**"

scripts/integration/gcp/test.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,14 @@ env:
88

99
matrix:
1010
version: [latest]
11+
12+
# changes to these files/paths will invoke the integration test in CI
13+
# expressions are evaluated using https://github.com/micromatch/picomatch
14+
paths:
15+
- "src/internal_events/gcp_pubsub.rs"
16+
- "src/sources/gcp_pubsub.rs"
17+
- "src/sources/util/**"
18+
- "src/sinks/gcp/**"
19+
- "src/sinks/util/**"
20+
- "src/gcp.rs"
21+
- "scripts/integration/gcp/**"

scripts/integration/http-client/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ env:
1010

1111
matrix:
1212
version: ["v0.34.1"]
13+
14+
# changes to these files/paths will invoke the integration test in CI
15+
# expressions are evaluated using https://github.com/micromatch/picomatch
16+
paths:
17+
- "src/sources/http_client/**"
18+
- "src/sources/util/**"
19+
- "scripts/integration/http-client/**"

scripts/integration/humio/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ runner:
99

1010
matrix:
1111
version: [1.13.1]
12+
13+
# changes to these files/paths will invoke the integration test in CI
14+
# expressions are evaluated using https://github.com/micromatch/picomatch
15+
paths:
16+
- "src/sinks/humio/**"
17+
- "src/sinks/util/**"
18+
- "scripts/integration/humio/**"

scripts/integration/influxdb/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ env:
1010

1111
matrix:
1212
version: ['1.8']
13+
14+
# changes to these files/paths will invoke the integration test in CI
15+
# expressions are evaluated using https://github.com/micromatch/picomatch
16+
paths:
17+
- "src/internal_events/influxdb.rs"
18+
- "src/sinks/influxdb/**"
19+
- "src/sinks/util/**"
20+
- "scripts/integration/influxdb/**"

scripts/integration/kafka/test.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,14 @@ env:
88

99
matrix:
1010
version: [latest]
11+
12+
# changes to these files/paths will invoke the integration test in CI
13+
# expressions are evaluated using https://github.com/micromatch/picomatch
14+
paths:
15+
- "src/internal_events/kafka.rs"
16+
- "src/sinks/kafka/**"
17+
- "src/sinks/util/**"
18+
- "src/sources/kafka.rs"
19+
- "src/sources/util/**"
20+
- "src/kafka.rs"
21+
- "scripts/integration/kafka/**"

scripts/integration/logstash/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ env:
99

1010
matrix:
1111
version: [7.12.1]
12+
13+
# changes to these files/paths will invoke the integration test in CI
14+
# expressions are evaluated using https://github.com/micromatch/picomatch
15+
paths:
16+
- "src/sources/logstash.rs"
17+
- "src/sources/util/**"
18+
- "scripts/integration/logstash/**"

scripts/integration/loki/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ env:
88

99
matrix:
1010
version: [2.4.1]
11+
12+
# changes to these files/paths will invoke the integration test in CI
13+
# expressions are evaluated using https://github.com/micromatch/picomatch
14+
paths:
15+
- "src/internal_events/loki.rs"
16+
- "src/sinks/loki/**"
17+
- "src/sinks/util/**"
18+
- "scripts/integration/loki/**"

scripts/integration/mongodb/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ env:
99

1010
matrix:
1111
version: [4.2.10]
12+
13+
# changes to these files/paths will invoke the integration test in CI
14+
# expressions are evaluated using https://github.com/micromatch/picomatch
15+
paths:
16+
- "src/internal_events/mongodb_metrics.rs"
17+
- "src/sources/mongodb_metrics/**"
18+
- "src/sources/util/**"
19+
- "scripts/integration/mongodb/**"

scripts/integration/nats/test.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,14 @@ env:
1414

1515
matrix:
1616
version: [latest]
17+
18+
# changes to these files/paths will invoke the integration test in CI
19+
# expressions are evaluated using https://github.com/micromatch/picomatch
20+
paths:
21+
- "src/internal_events/nats.rs"
22+
- "src/sources/nats.rs"
23+
- "src/sources/util/**"
24+
- "src/sinks/nats.rs"
25+
- "src/sinks/util/**"
26+
- "src/nats.rs"
27+
- "scripts/integration/nats/**"

scripts/integration/nginx/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ runner:
1111

1212
matrix:
1313
version: [1.19.4]
14+
15+
# changes to these files/paths will invoke the integration test in CI
16+
# expressions are evaluated using https://github.com/micromatch/picomatch
17+
paths:
18+
- "src/internal_events/nginx_metrics.rs"
19+
- "src/sources/nginx_metrics/**"
20+
- "src/sources/util/**"
21+
- "scripts/integration/nginx/**"

scripts/integration/opentelemetry/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ runner:
1010

1111
matrix:
1212
version: [0.56.0]
13+
14+
# changes to these files/paths will invoke the integration test in CI
15+
# expressions are evaluated using https://github.com/micromatch/picomatch
16+
paths:
17+
- "src/sources/opentelemetry/**"
18+
- "src/sources/util/**"
19+
- "scripts/integration/opentelemetry/**"

scripts/integration/postgres/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ runner:
1313

1414
matrix:
1515
version: ['13.1']
16+
17+
# changes to these files/paths will invoke the integration test in CI
18+
# expressions are evaluated using https://github.com/micromatch/picomatch
19+
paths:
20+
- "src/internal_events/postgresql_metrics.rs"
21+
- "src/sources/postgresql_metrics.rs"
22+
- "src/sources/util/**"
23+
- "scripts/integration/postgres/**"

scripts/integration/prometheus/test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ env:
99
matrix:
1010
prometheus: ['v2.33.4']
1111
influxdb: ['1.8']
12+
13+
# changes to these files/paths will invoke the integration test in CI
14+
# expressions are evaluated using https://github.com/micromatch/picomatch
15+
paths:
16+
- "src/internal_events/prometheus.rs"
17+
- "src/sources/prometheus/**"
18+
- "src/sources/util/**"
19+
- "src/sinks/prometheus/**"
20+
- "src/sinks/util/**"
21+
- "scripts/integration/prometheus/**"

scripts/integration/pulsar/test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ env:
88

99
matrix:
1010
version: [latest]
11+
12+
# changes to these files/paths will invoke the integration test in CI
13+
# expressions are evaluated using https://github.com/micromatch/picomatch
14+
paths:
15+
- "src/internal_events/pulsar.rs"
16+
- "src/sinks/pulsar/**"
17+
- "src/sinks/util/**"
18+
- "scripts/integration/pulsar/**"

scripts/integration/redis/test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,13 @@ env:
88

99
matrix:
1010
version: [6-alpine]
11+
12+
# changes to these files/paths will invoke the integration test in CI
13+
# expressions are evaluated using https://github.com/micromatch/picomatch
14+
paths:
15+
- "src/internal_events/redis.rs"
16+
- "src/sources/redis/**"
17+
- "src/sources/util/**"
18+
- "src/sinks/redis.rs"
19+
- "src/sinks/util/**"
20+
- "scripts/integration/redis/**"

0 commit comments

Comments
 (0)