Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Move most CI checks to merge queue #17340

Merged
merged 238 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from 220 commits
Commits
Show all changes
238 commits
Select commit Hold shift + click to select a range
1f054de
remove unecessary workflows
neuronull Apr 25, 2023
9caf8cf
DRAFT experiment with workflows for merge queue (#2)
neuronull Apr 26, 2023
4c4ead9
use event payload to get comment body
neuronull Apr 26, 2023
a3ef6af
temp comment out to allow it to show as a status check
neuronull Apr 26, 2023
122c4c5
run on dispatch
neuronull Apr 26, 2023
ccd98db
master merge queue as a status check
neuronull Apr 26, 2023
1e1951e
temp reduce runtime of Checks
neuronull Apr 26, 2023
7a762af
shorten runtime of merge queue
neuronull Apr 26, 2023
7b55c19
testing workflow (#3)
neuronull Apr 26, 2023
149b7f2
add an actual job not in the other workflows to merge queue
neuronull Apr 27, 2023
ba9df94
shorten runtimes
neuronull Apr 27, 2023
4b30c5d
Revert "add an actual job not in the other workflows to merge queue"
neuronull Apr 27, 2023
fd7dd67
make merge queue status check pass automatically on PRs
neuronull Apr 27, 2023
63845fc
debugging
neuronull Apr 27, 2023
11bff58
adjustments to merge queue pass on PR
neuronull Apr 27, 2023
bbd961f
bash things
neuronull Apr 27, 2023
e2a3c5c
bash thangs
neuronull Apr 27, 2023
f0e3c29
bash thangs
neuronull Apr 27, 2023
a462bd8
bash thangs
neuronull Apr 27, 2023
70aee4b
testing merge queue (#4)
neuronull Apr 27, 2023
f53f09c
shorten runtime more
neuronull Apr 27, 2023
bef839d
try fix comment trigger
neuronull May 1, 2023
1318ccc
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 1, 2023
5d07909
limit scope
neuronull May 1, 2023
c440e41
more scope
neuronull May 1, 2023
7cec18c
different syntax
neuronull May 1, 2023
36281b8
issue comment
neuronull May 1, 2023
91f5521
closer
neuronull May 1, 2023
bf3e656
test
neuronull May 1, 2023
56a2386
comment body?
neuronull May 1, 2023
f64e0f4
update status on the PR
neuronull May 1, 2023
fc13e20
test expression
neuronull May 1, 2023
7e093e9
expression
neuronull May 1, 2023
916f517
expression works
neuronull May 1, 2023
7df850f
fix comment trigger unit mac
neuronull May 1, 2023
c73dcdd
move pending in PR to top
neuronull May 1, 2023
413b9a5
issue comment for misc
neuronull May 1, 2023
6dc1d97
issue comment for win
neuronull May 1, 2023
4bb5d91
issue comment for comp feats
neuronull May 1, 2023
abe7127
forgot conditional fixes
neuronull May 1, 2023
2306380
issue comment for cross
neuronull May 1, 2023
da0ebf7
issue comments on int tests
neuronull May 1, 2023
51ae61e
try different logic
neuronull May 1, 2023
a000905
try diff logic
neuronull May 1, 2023
fe859c3
typo
neuronull May 1, 2023
b24fa49
?
neuronull May 1, 2023
20bb7a1
better be it
neuronull May 1, 2023
e90ff05
typo
neuronull May 1, 2023
b996ff5
fix conditionals
neuronull May 1, 2023
72acc1e
typo
neuronull May 1, 2023
411ade8
fix order
neuronull May 1, 2023
102adff
fix k8
neuronull May 1, 2023
a3a7226
fix int tests
neuronull May 1, 2023
e4dabc4
fix logics
neuronull May 1, 2023
28874d8
fix logic in k8s
neuronull May 1, 2023
f088fa1
further int and k8s improvements
neuronull May 1, 2023
8668a62
try fix regression
neuronull May 1, 2023
dcd2888
fix k8s reporting
neuronull May 1, 2023
c62c9c4
baseline
neuronull May 1, 2023
d06d307
fix k8s
neuronull May 1, 2023
b80717f
try full merge queue
neuronull May 2, 2023
fc93a70
enable int and k8s on merge queue
neuronull May 2, 2023
af923fd
auto mark k8s and int as passed if PR
neuronull May 2, 2023
269c6d8
fixes
neuronull May 2, 2023
cda0ac0
check for merge queue in reg
neuronull May 2, 2023
b3c24da
temp disable token required int tests
neuronull May 2, 2023
8694337
fixes
neuronull May 2, 2023
bcf3b6a
fixes
neuronull May 2, 2023
5fbe4c4
fixes
neuronull May 2, 2023
ff39c08
fixes
neuronull May 2, 2023
621ef2c
typo
neuronull May 2, 2023
b2c4865
check in master not main
neuronull May 2, 2023
134f36f
try fix trusted
neuronull May 2, 2023
04c5920
try remove expression syntax
neuronull May 2, 2023
986aa2f
Yeehaw (#10)
neuronull May 2, 2023
8acc7e6
try fix reg
neuronull May 3, 2023
e7f6ba6
temp disable other workflows to focus on reg
neuronull May 3, 2023
c02106d
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 3, 2023
1054934
fix reg detector on PR runs
neuronull May 3, 2023
e4df03b
for the trusted workflow actually
neuronull May 3, 2023
aff1ccd
rename
neuronull May 3, 2023
03e4a65
fix up getting base sha
neuronull May 3, 2023
d16e2bf
cleanup
neuronull May 3, 2023
5ea6db9
run k8s on file detection
neuronull May 3, 2023
9e70ce4
fix run rules k8s
neuronull May 3, 2023
debeebe
fixup if logic k8s
neuronull May 3, 2023
81dbb58
comment
neuronull May 3, 2023
b46f677
fix changes detection for merge queue
neuronull May 3, 2023
2fc8b49
fix file detection refs for k8s
neuronull May 3, 2023
f7e4206
typo
neuronull May 3, 2023
f901fc2
trigger k8s
neuronull May 3, 2023
88a61ab
fix changes call from test.yml
neuronull May 3, 2023
38c8e1e
.
neuronull May 3, 2023
320c8e9
facepalm
neuronull May 3, 2023
b236e98
.
neuronull May 3, 2023
b747bca
cleanup
neuronull May 3, 2023
e29ea2f
add install.sh
neuronull May 3, 2023
9642aba
.
neuronull May 3, 2023
cefa826
fixes
neuronull May 3, 2023
598f407
various fixes
neuronull May 3, 2023
07e6388
Merge branch 'master' into neuronull/test10
neuronull May 3, 2023
09e62be
fix always
neuronull May 3, 2023
871b693
change regression and enable test
neuronull May 3, 2023
fe70713
fix typos
neuronull May 3, 2023
6e98ed4
fix typo in k8s
neuronull May 3, 2023
66118df
logic for int tests
neuronull May 4, 2023
24cdd38
remove labeler
neuronull May 4, 2023
fb4d7d9
mock out the actual tests
neuronull May 4, 2023
73576dc
update paths
neuronull May 4, 2023
7067666
Revert "update paths"
neuronull May 4, 2023
67198ae
try conditional matrix
neuronull May 4, 2023
a71b845
angry gh ? (#15)
neuronull May 4, 2023
bbae3bf
try false
neuronull May 4, 2023
70c5585
fix merge queue check
neuronull May 4, 2023
725b64b
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 4, 2023
7c5c2e3
remove uneeded job
neuronull May 4, 2023
881574c
touch amqp (#16)
neuronull May 4, 2023
a6bc74c
another try
neuronull May 4, 2023
18cc6cb
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 4, 2023
b823417
touch amqp (#17)
neuronull May 4, 2023
cde2d27
int tests
neuronull May 4, 2023
3962e4e
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 4, 2023
3c7fb23
touch amqp (#18)
neuronull May 4, 2023
fa7d5a1
touchup
neuronull May 4, 2023
0b78789
touchup
neuronull May 4, 2023
6dc6cd2
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 4, 2023
37140ac
based on changes now
neuronull May 4, 2023
cd73258
temp
neuronull May 4, 2023
dc8ff61
Revert "temp"
neuronull May 4, 2023
85aa21c
touch amqp (#19)
neuronull May 4, 2023
8589665
try wrap expression
neuronull May 4, 2023
be1da81
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 4, 2023
c1a05e9
did I haz a bug
neuronull May 4, 2023
0aed9fc
gate
neuronull May 4, 2023
54077fb
touch amqp (#20)
neuronull May 4, 2023
83764f8
try different approach
neuronull May 4, 2023
4df68e8
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 4, 2023
45e5067
typo
neuronull May 4, 2023
af2b195
touch amqp (#21)
neuronull May 4, 2023
484168f
needs id
neuronull May 4, 2023
42d15a0
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 4, 2023
82ab049
touch amqp (#22)
neuronull May 4, 2023
8b909f6
almost
neuronull May 4, 2023
c4325b7
Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 4, 2023
1de77c6
touch amqp (#23)
neuronull May 4, 2023
8a229ac
omg
neuronull May 4, 2023
d442c92
t Merge branch 'master' of github.com:vectordotdev/vector-ci-draft
neuronull May 4, 2023
3bd7c24
typo
neuronull May 4, 2023
a3371bb
typo
neuronull May 4, 2023
f8c13b8
re enable if
neuronull May 4, 2023
fff5992
bash
neuronull May 4, 2023
dc699b4
try some stuff
neuronull May 4, 2023
7d10985
debugging
neuronull May 4, 2023
02d28a8
debug
neuronull May 4, 2023
f4c2f38
debug
neuronull May 4, 2023
d940bab
fix
neuronull May 4, 2023
4de3874
try trigger comment int tests
neuronull May 4, 2023
7498408
try int test comment
neuronull May 5, 2023
bdbb9cd
typo
neuronull May 5, 2023
d96ccee
shrug
neuronull May 5, 2023
375f6a3
name change
neuronull May 5, 2023
2f32589
use PR number from changes for reg
neuronull May 5, 2023
4899501
prep trusted
neuronull May 5, 2023
e782d09
re enable install
neuronull May 5, 2023
8c2d086
require trusted
neuronull May 5, 2023
2aad1d7
try fix trusted
neuronull May 5, 2023
68923e1
adding some documentation
neuronull May 5, 2023
035765e
forgot one
neuronull May 5, 2023
4712e00
re work the regression workflow
neuronull May 5, 2023
4c3eae9
cleanup and forgot one
neuronull May 5, 2023
930e409
re enable the actual tests
neuronull May 5, 2023
69aa124
rename baseline > compilation
neuronull May 5, 2023
7d00508
temp disable version check
neuronull May 5, 2023
f40154c
fix things
neuronull May 5, 2023
d5b202f
Merge branch 'master' of ../vector-ci-draft into neuronull/ci_add_mer…
neuronull May 5, 2023
d780da1
Revert "remove labeler"
neuronull May 5, 2023
9c1dc09
Revert "remove unecessary workflows"
neuronull May 5, 2023
2207acc
restore cargo.toml
neuronull May 5, 2023
29ac7dc
restore source
neuronull May 5, 2023
0c5ed45
touchups
neuronull May 8, 2023
dc929e2
remove mocks
neuronull May 8, 2023
1138a08
touchups
neuronull May 8, 2023
47246f8
add back dispatch trigger for env
neuronull May 8, 2023
75cdf1f
fix typos
neuronull May 8, 2023
44ead21
mostly restore regression workflows
neuronull May 8, 2023
0d5b580
mostly restore regression workflows
neuronull May 8, 2023
5f0b8ff
mostly restore regression workflows
neuronull May 8, 2023
b940457
update note
neuronull May 9, 2023
d43aeb5
Merge branch 'master' into neuronull/ci_add_merge_queue
neuronull May 9, 2023
369cf4f
fix up regression trusted
neuronull May 9, 2023
ddeecbd
fix reg
neuronull May 9, 2023
b1daf60
typo
neuronull May 9, 2023
d3ed90f
rename baseline
neuronull May 9, 2023
09abb8c
update changes detections
neuronull May 9, 2023
20aed4f
fix int comment workflow
neuronull May 9, 2023
d5a1cfb
add integration workflow
neuronull May 9, 2023
f0511c8
update k8s
neuronull May 9, 2023
219d51d
update master merge queue
neuronull May 9, 2023
a5c87ed
use a tag
neuronull May 9, 2023
139ec58
deploy > run
neuronull May 9, 2023
dcd8fff
remove not useful comments
neuronull May 9, 2023
2397499
whitespace
neuronull May 9, 2023
c1dbced
change order of operations to be consistent
neuronull May 9, 2023
6a68cdf
add documentation and fix typo
neuronull May 9, 2023
52416e3
fix event name
neuronull May 9, 2023
a59eaaa
fix logic in k8s
neuronull May 9, 2023
bbfd789
add filter on issue comments for PRs only
neuronull May 11, 2023
975434d
add ci-run-all
neuronull May 11, 2023
2524931
add comment validation
neuronull May 11, 2023
8f29583
Merge branch 'master' into neuronull/ci_add_merge_queue
neuronull May 11, 2023
47dea5f
typo
neuronull May 11, 2023
0ad782a
fix k8s
neuronull May 15, 2023
fa3906c
add comment trigger workflow
neuronull May 15, 2023
46c7ba1
documentation
neuronull May 15, 2023
36e6135
Merge branch 'master' into neuronull/ci_add_merge_queue
neuronull May 15, 2023
b14f91c
make regression detection a singular workflow
neuronull May 15, 2023
6f5531a
typo and more doc
neuronull May 15, 2023
32ce960
Merge branch 'neuronull/ci_add_merge_queue' into neuronull/ci_one_reg…
neuronull May 15, 2023
96900d6
remove line
neuronull May 15, 2023
3307a62
typo
neuronull May 15, 2023
91c974b
add env and install
neuronull May 16, 2023
305b4a7
typo
neuronull May 16, 2023
1d6dcaf
Merge branch 'neuronull/ci_add_merge_queue' into neuronull/ci_one_reg…
neuronull May 16, 2023
4737b07
restrict k8s
neuronull May 16, 2023
7812007
update comment
neuronull May 16, 2023
21227f0
typo
neuronull May 16, 2023
37ec4c0
Merge branch 'neuronull/ci_add_merge_queue' into neuronull/ci_one_reg…
neuronull May 16, 2023
a677e9f
Merge branch 'master' into neuronull/ci_add_merge_queue
neuronull May 16, 2023
305f642
Merge branch 'neuronull/ci_add_merge_queue' into neuronull/ci_one_reg…
neuronull May 16, 2023
e03aecb
Merge branch 'neuronull/ci_add_merge_queue' into neuronull/ci_save_on…
neuronull May 16, 2023
1bd175d
feedback js
neuronull May 16, 2023
6f8a5c5
update comment trigger
neuronull May 16, 2023
789e3e5
typo
neuronull May 16, 2023
311de48
stray merge conflict artifacts
neuronull May 17, 2023
2bd2f25
Merge branch 'neuronull/ci_add_merge_queue' into neuronull/ci_one_reg…
neuronull May 17, 2023
5bfafa4
Merge branch 'neuronull/ci_add_merge_queue' into neuronull/ci_save_on…
neuronull May 17, 2023
d356d76
Merge branch 'neuronull/ci_one_regression_workflow' into neuronull/ci…
neuronull May 19, 2023
dd23290
update comment
neuronull May 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
333 changes: 333 additions & 0 deletions .github/workflows/changes.yml
spencergilbert marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,333 @@
# This workflow identifies changes between the base and the head ref, for use in
# other workflows to decide if they should be executed.

name: Identify Changes

on:
workflow_call:
# These inputs allow the filter action to be able to access the correct refs for
# comparison in changes detection, it is required as this is called from the
# merge_group context.
inputs:
base_ref:
required: true
type: string
head_ref:
required: true
type: string
outputs:
source:
value: ${{ jobs.changes.outputs.source }}
dependencies:
value: ${{ jobs.changes.outputs.dependencies }}
internal_events:
value: ${{ jobs.changes.outputs.internal_events }}
cue:
value: ${{ jobs.changes.outputs.cue }}
component_docs:
value: ${{ jobs.changes.outputs.component_docs }}
markdown:
value: ${{ jobs.changes.outputs.markdown }}
install:
value: ${{ jobs.changes.outputs.install }}
k8s:
value: ${{ jobs.changes.outputs.k8s }}
all-int:
value: ${{ jobs.changes.outputs.all-int }}
amqp:
value: ${{ jobs.changes.outputs.amqp }}
appsignal:
value: ${{ jobs.changes.outputs.appsignal }}
aws:
value: ${{ jobs.changes.outputs.aws }}
axiom:
value: ${{ jobs.changes.outputs.axiom }}
azure:
value: ${{ jobs.changes.outputs.azure }}
clickhouse:
value: ${{ jobs.changes.outputs.clickhouse }}
databend:
value: ${{ jobs.changes.outputs.databend }}
datadog:
value: ${{ jobs.changes.outputs.datadog }}
dnstap:
value: ${{ jobs.changes.outputs.dnstap }}
docker-logs:
value: ${{ jobs.changes.outputs.docker-logs }}
elasticsearch:
value: ${{ jobs.changes.outputs.elasticsearch }}
eventstoredb:
value: ${{ jobs.changes.outputs.eventstoredb }}
fluent:
value: ${{ jobs.changes.outputs.fluent }}
gcp:
value: ${{ jobs.changes.outputs.gcp }}
humio:
value: ${{ jobs.changes.outputs.humio }}
http-client:
value: ${{ jobs.changes.outputs.http-client }}
influxdb:
value: ${{ jobs.changes.outputs.influxdb }}
kafka:
value: ${{ jobs.changes.outputs.kafka }}
logstash:
value: ${{ jobs.changes.outputs.logstash }}
loki:
value: ${{ jobs.changes.outputs.loki }}
mongodb:
value: ${{ jobs.changes.outputs.mongodb }}
nats:
value: ${{ jobs.changes.outputs.nats }}
nginx:
value: ${{ jobs.changes.outputs.nginx }}
opentelemetry:
value: ${{ jobs.changes.outputs.opentelemetry }}
postgres:
value: ${{ jobs.changes.outputs.postgres }}
prometheus:
value: ${{ jobs.changes.outputs.prometheus }}
pulsar:
value: ${{ jobs.changes.outputs.pulsar }}
redis:
value: ${{ jobs.changes.outputs.redis }}
splunk:
value: ${{ jobs.changes.outputs.splunk }}
webhdfs:
value: ${{ jobs.changes.outputs.webhdfs }}

jobs:
changes:
runs-on: ubuntu-20.04
# Set job outputs to values from filter step
outputs:
# General source code
source: ${{ steps.filter.outputs.source }}
dependencies: ${{ steps.filter.outputs.dependencies }}
internal_events: ${{ steps.filter.outputs.internal_events }}
cue: ${{ steps.filter.outputs.cue }}
component_docs: ${{ steps.filter.outputs.component_docs }}
markdown: ${{ steps.filter.outputs.markdown }}
install: ${{ steps.filter.outputs.install }}
# K8s
k8s: ${{ steps.filter.outputs.k8s }}
# Integrations
all-int: ${{ steps.filter.outputs.all-int }}
amqp: ${{ steps.filter.outputs.amqp }}
appsignal: ${{ steps.filter.outputs.appsignal}}
aws: ${{ steps.filter.outputs.aws }}
axiom: ${{ steps.filter.outputs.axiom }}
azure: ${{ steps.filter.outputs.azure }}
clickhouse: ${{ steps.filter.outputs.clickhouse }}
databend: ${{ steps.filter.outputs.databend }}
datadog: ${{ steps.filter.outputs.datadog }}
dnstap: ${{ steps.filter.outputs.dnstap }}
docker-logs: ${{ steps.filter.outputs.docker-logs }}
elasticsearch: ${{ steps.filter.outputs.elasticsearch }}
eventstoredb: ${{ steps.filter.outputs.eventstoredb }}
fluent: ${{ steps.filter.outputs.fluent }}
gcp: ${{ steps.filter.outputs.gcp }}
humio: ${{ steps.filter.outputs.humio }}
http-client: ${{ steps.filter.outputs.http-client }}
influxdb: ${{ steps.filter.outputs.influxdb }}
kafka: ${{ steps.filter.outputs.kafka }}
logstash: ${{ steps.filter.outputs.logstash }}
loki: ${{ steps.filter.outputs.loki }}
mongodb: ${{ steps.filter.outputs.mongodb }}
nats: ${{ steps.filter.outputs.nats }}
nginx: ${{ steps.filter.outputs.nginx }}
opentelemetry: ${{ steps.filter.outputs.opentelemetry }}
postgres: ${{ steps.filter.outputs.postgres }}
prometheus: ${{ steps.filter.outputs.prometheus }}
pulsar: ${{ steps.filter.outputs.pulsar }}
redis: ${{ steps.filter.outputs.redis }}
splunk: ${{ steps.filter.outputs.splunk }}
webhdfs: ${{ steps.filter.outputs.webhdfs }}
steps:
- uses: actions/checkout@v3

- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ inputs.base_ref }}
ref: ${{ inputs.head_ref }}
filters: |
source:
- ".github/workflows/test.yml"
- ".cargo/**"
- "benches/**"
- "lib/**"
- "proto/**"
- "scripts/**"
- "src/**"
- "tests/**"
- "build.rs"
- "Cargo.lock"
- "Cargo.toml"
- "Makefile"
- "rust-toolchain.toml"
- "vdev/**"
deny:
- 'deny.toml'
- "vdev/**"
dependencies:
- ".cargo/**"
- 'Cargo.toml'
- 'Cargo.lock'
- 'rust-toolchain.toml'
- '.github/workflows/pr.yml'
- 'Makefile'
- 'scripts/cross/**'
- "vdev/**"
cue:
- 'website/cue/**'
- "vdev"
component_docs:
- 'scripts/generate-component-docs.rb'
- "vdev/**"
markdown:
- '**/**.md'
- "vdev/**"
internal_events:
- 'src/internal_events/**'
- "vdev/**"
docker:
- 'distribution/docker/**'
- "vdev/**"
install:
- ".github/workflows/install-sh.yml"
- "distribution/install.sh"
k8s:
- "src/sources/kubernetes_logs/**"
all-int:
- "lib/vector-core/**"
amqp:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a follow-up, but I'd love to see these closer to the tests themselves in https://github.com/vectordotdev/vector/blob/master/scripts/integration/amqp/test.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.. I did see they have an option to define them in a separate file. It shouldn't be hard to add that.
Though, from what I'm seeing it is a single file to read from 🤔 (as opposed to a file-per key)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though I suppose could split that out into different jobs.

Copy link
Member

@jszwedko jszwedko May 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also add a subcommand to vdev integration that spits out the file paths by parsing the test.yaml files and call that in CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I do like that better... Ok, I think that is a good candidate for a follow-up task.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the integration tests, it struck me that we might want to check for changes in common places like 'lib/' or something like that, and run all of them.
Wanted to get team's thoughts on that as I'm sure there would be some cases where that wouldn't be necessary, but figured "core" code utilized everywhere might benefit from that.

- "src/amqp.rs"
- "src/internal_events/amqp.rs"
- "src/sinks/amqp/**"
- "src/sources/amqp.rs"
- "src/sources/util/**"
- "src/sinks/util/**"
appsignal:
- "src/sinks/appsignal/**"
- "src/sinks/util/**"
aws:
- "src/aws_**"
- "src/internal_events/aws_**"
- "src/sources/aws_**"
- "src/sources/util/**"
- "src/sinks/aws_**"
- "src/sinks/util/**"
- "src/transforms/aws_**"
axiom:
- "src/sinks/axiom.rs"
- "src/sinks/util/**"
azure:
- "src/sinks/azure_**"
- "src/sinks/util/**"
clickhouse:
- "src/sinks/clickhouse/**"
- "src/sinks/util/**"
databend:
- "src/sinks/databend/**"
- "src/sinks/util/**"
datadog:
- "src/common/datadog.rs"
- "src/internal_events/datadog_*"
- "src/sources/datadog_agent/**"
- "src/sinks/datadog/**"
- "src/sinks/datadog_archives.rs"
- "src/sinks/util/**"
docker-logs:
- "src/docker.rs"
- "src/internal_events/docker_logs.rs"
- "src/sources/docker_logs/**"
- "src/sources/util/**"
neuronull marked this conversation as resolved.
Show resolved Hide resolved
elasticsearch:
- "src/sinks/elasticsearch/**"
- "src/sinks/util/**"
eventstoredb:
- "src/internal_events/eventstoredb_metrics.rs"
- "src/sources/eventstoredb_metrics/**"
- "src/sources/util/**"
fluent:
- "src/internal_events/fluent.rs"
- "src/sources/fluent/**"
- "src/sources/util/**"
gcp:
- "src/internal_events/gcp_pubsub.rs"
- "src/sources/gcp_pubsub.rs"
- "src/sources/util/**"
- "src/sinks/gcp/**"
- "src/sinks/util/**"
- "src/gcp.rs"
humio:
- "src/sinks/humio/**"
- "src/sinks/util/**"
http-client:
- "src/sinks/http-client/**"
influxdb:
- "src/internal_events/influxdb.rs"
- "src/sinks/influxdb/**"
- "src/sinks/util/**"
kafka:
- "src/internal_events/kafka.rs"
- "src/sinks/kafka/**"
- "src/sinks/util/**"
- "src/sources/kafka.rs"
- "src/sources/util/**"
- "src/kafka.rs"
logstash:
- "src/sources/logstash.rs"
- "src/sources/util/**"
loki:
- "src/internal_events/loki.rs"
- "src/sinks/loki/**"
- "src/sinks/util/**"
mongodb:
- "src/internal_events/mongodb_metrics.rs"
- "src/sources/mongodb_metrics/**"
- "src/sources/util/**"
nats:
- "src/internal_events/nats.rs"
- "src/sources/nats.rs"
- "src/sources/util/**"
- "src/sinks/nats.rs"
- "src/sinks/util/**"
- "src/nats.rs"
nginx:
- "src/internal_events/nginx_metrics.rs"
- "src/sources/nginx_metrics/**"
- "src/sources/util/**"
opentelemetry:
- "src/sources/opentelemetry/**"
- "src/sources/util/**"
postgres:
- "src/internal_events/postgresql_metrics.rs"
- "src/sources/postgresql_metrics.rs"
- "src/sources/util/**"
prometheus:
- "src/internal_events/prometheus.rs"
- "src/sources/prometheus/**"
- "src/sources/util/**"
- "src/sinks/prometheus/**"
- "src/sinks/util/**"
pulsar:
- "src/internal_events/pulsar.rs"
- "src/sinks/pulsar/**"
- "src/sinks/util/**"
redis:
- "src/internal_events/redis.rs"
- "src/sources/redis/**"
- "src/sources/util/**"
- "src/sinks/redis.rs"
- "src/sinks/util/**"
splunk:
- "src/internal_events/splunk_hec.rs"
- "src/sources/splunk_hec/**"
- "src/sources/util/**"
- "src/sinks/splunk_hec/**"
- "src/sinks/util/**"
webhdfs:
- "src/sinks/webhdfs/**"
- "src/sinks/util/**"

63 changes: 63 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CLI - Linux

on:
workflow_call:

jobs:
test-cli:
runs-on: [linux, ubuntu-20.04-8core]
env:
CARGO_INCREMENTAL: 0
steps:
- name: (PR comment) Get PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch

- name: (PR comment) Set latest commit status as pending
if: ${{ github.event_name == 'issue_comment' }}
uses: myrotvorets/[email protected]
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: CLI - Linux
status: pending

- name: (PR comment) Checkout PR branch
if: ${{ github.event_name == 'issue_comment' }}
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}

- name: Checkout branch
if: ${{ github.event_name != 'issue_comment' }}
uses: actions/checkout@v3

- name: Cache Cargo registry + index
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: echo "::add-matcher::.github/matchers/rust.json"
- run: make test-cli
- name: Upload test results
run: scripts/upload-test-results.sh
if: always()

- name: (PR comment) Set latest commit status as ${{ job.status }}
uses: myrotvorets/[email protected]
if: always() && github.event_name == 'issue_comment'
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: CLI - Linux
status: ${{ job.status }}
Loading