Skip to content

Commit 0846ec6

Browse files
partheaclundin25
andauthored
feat: Add support for Python 3.12 (#1421)
* feat: Add support for Python 3.12 * Add samples lint session * Add constraints file for python 3.12 * chore: Refresh system test creds. * only run specified nox session for samples --------- Co-authored-by: Carl Lundin <[email protected]>
1 parent ed7fa00 commit 0846ec6

File tree

25 files changed

+214
-10
lines changed

25 files changed

+214
-10
lines changed

packages/google-auth/.github/sync-repo-settings.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ branchProtectionRules:
1515
- 'Samples - Python 3.8'
1616
- 'Samples - Python 3.9'
1717
- 'Samples - Python 3.10'
18+
- 'Samples - Python 3.11'
19+
- 'Samples - Python 3.12'
1820
permissionRules:
1921
- team: actools-python
2022
permission: admin

packages/google-auth/.kokoro/samples-test-setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ gcloud config set project ${PROJECT_ID}
4444
# Decrypt system test secrets
4545
./scripts/decrypt-secrets.sh
4646

47-
# Run system tests which use a different noxfile
48-
python3 -m nox -f samples/cloud-client/snippets/noxfile.py
47+
# Run samples tests which use a different noxfile
48+
python3 -m nox -f samples/cloud-client/snippets/noxfile.py -s "$RUN_TESTS_SESSION"

packages/google-auth/.kokoro/samples/lint/common.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ action {
77
}
88
}
99

10+
# Specify which tests to run
11+
env_vars: {
12+
key: "RUN_TESTS_SESSION"
13+
value: "lint"
14+
}
15+
16+
1017
# Download trampoline resources.
1118
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
1219

packages/google-auth/.kokoro/samples/python3.10/common.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ action {
77
}
88
}
99

10+
# Specify which tests to run
11+
env_vars: {
12+
key: "RUN_TESTS_SESSION"
13+
value: "unit-3.10"
14+
}
15+
1016
# Download trampoline resources.
1117
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
1218

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
# Specify which tests to run
11+
env_vars: {
12+
key: "RUN_TESTS_SESSION"
13+
value: "unit-3.11"
14+
}
15+
16+
# Download trampoline resources.
17+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
18+
19+
# Download resources for system tests (service account key, etc.)
20+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-auth-library-python"
21+
22+
# Use the trampoline script to run in docker.
23+
build_file: "google-auth-library-python/.kokoro/trampoline.sh"
24+
25+
# Configure the docker image for kokoro-trampoline.
26+
env_vars: {
27+
key: "TRAMPOLINE_IMAGE"
28+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
29+
}
30+
env_vars: {
31+
key: "TRAMPOLINE_BUILD_FILE"
32+
value: "github/google-auth-library-python/.kokoro/build.sh"
33+
}
34+
env_vars: {
35+
key: "TRAMPOLINE_BUILD_FILE"
36+
value: "github/google-auth-library-python/.kokoro/samples-test-setup.sh"
37+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
7+
8+
env_vars: {
9+
key: "TRAMPOLINE_BUILD_FILE"
10+
value: "github/google-auth-library-python/.kokoro/test-samples-against-head.sh"
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "False"
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "INSTALL_LIBRARY_FROM_SOURCE"
5+
value: "True"
6+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
# Specify which tests to run
11+
env_vars: {
12+
key: "RUN_TESTS_SESSION"
13+
value: "unit-3.12"
14+
}
15+
16+
# Download trampoline resources.
17+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
18+
19+
# Download resources for system tests (service account key, etc.)
20+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-auth-library-python"
21+
22+
# Use the trampoline script to run in docker.
23+
build_file: "google-auth-library-python/.kokoro/trampoline.sh"
24+
25+
# Configure the docker image for kokoro-trampoline.
26+
env_vars: {
27+
key: "TRAMPOLINE_IMAGE"
28+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
29+
}
30+
env_vars: {
31+
key: "TRAMPOLINE_BUILD_FILE"
32+
value: "github/google-auth-library-python/.kokoro/build.sh"
33+
}
34+
env_vars: {
35+
key: "TRAMPOLINE_BUILD_FILE"
36+
value: "github/google-auth-library-python/.kokoro/samples-test-setup.sh"
37+
}

0 commit comments

Comments
 (0)