Skip to content

Commit c962fda

Browse files
committed
ci: Test upper bound dependenices file in Github CI
1 parent 9cae675 commit c962fda

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Check if a filename was provided as an argument
4+
if [ -z "$1" ]; then
5+
echo "Usage: $0 <dependency_file>"
6+
exit 1
7+
fi
8+
9+
DEPENDENCY_FILE="$1"
10+
MAVEN_COMMAND="mvn verify -Penable-integration-tests -Dclirr.skip -Dcheckstyle.skip -Dfmt.skip "
11+
12+
# Read the file line by line
13+
while IFS= read -r line; do
14+
# Ignore comments and blank lines
15+
if [[ "${line}" =~ ^[[:space:]]*# ]] || [[ -z "${line}" ]]; then
16+
continue
17+
fi
18+
19+
# Extract the dependency name and version
20+
# We use 'cut' to split the line by '=' and trim whitespace
21+
# The sed command is used to remove potential trailing whitespace from the version number
22+
dependency=$(echo "${line}" | cut -d'=' -f1 | tr -d '[:space:]')
23+
version=$(echo "${line}" | cut -d'=' -f2 | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
24+
25+
# Append the formatted property to the Maven command
26+
MAVEN_COMMAND+=" -D${dependency.version}=${version}"
27+
done < "${DEPENDENCY_FILE}"
28+
29+
# Run the generated maven command
30+
$MAVEN_COMMAND
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Dependency Compatibility Test
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 1 * * *' # Nightly at 1am
7+
8+
jobs:
9+
dependency-compatibility-test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '21'
19+
distribution: 'temurin'
20+
cache: maven
21+
- name: Perform Dependency Compatibility Testing
22+
run: ./.github/scripts/test_dependency_compatibility.sh dependencies.txt

dependencies.txt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# 1P Parent-Pom
2+
javax.annotation-api=1.3.2
3+
grpc=1.74.0
4+
google.auth=1.37.1
5+
google.http-client=1.47.1
6+
gson=2.13.1
7+
guava=33.4.8-jre
8+
protobuf=4.31.1
9+
opentelemetry=1.52.0
10+
errorprone=4.15.1
11+
j2objc-annotations=3.0.0
12+
threetenbp=1.7.1
13+
slf4j=2.0.17
14+
15+
# 1P Shared-Deps
16+
grpc-gcp=1.6.1
17+
google.oauth-client=1.39.0
18+
google.api-client=2.8.0
19+
20+
# 3P Shared-Deps
21+
threeten-extra=1.8.0
22+
opencensus=0.31.0
23+
findbugs=3.0.2
24+
# Ignore this for now as maven is trying resolve this to be jackson v2.19.2.2
25+
# jackson=2.19.2
26+
errorprone=2.41.0
27+
codec=1.19.0
28+
httpcomponents.httpcore=4.4.16
29+
httpcomponents.httpclient=4.5.14
30+
apache-httpclient-5=5.5
31+
apache-httpcore-5=5.3.4
32+
perfmark-api=0.27.0
33+
j2objc-annotations=3.0.0
34+
google.cloud.opentelemetry=0.36.0
35+
opentelemetry-semconv=1.34.0
36+
flogger=0.9
37+
arrow=18.3.0
38+
dev.cel=0.10.1
39+
com.google.crypto.tink=1.18.0
40+
io.opentelemetry.contrib.opentelemetry-gcp-resources=1.48.0-alpha

0 commit comments

Comments
 (0)