Skip to content

Commit 057bc23

Browse files
authored
build: add a new presubmit core_deps_from_source (#13510)
This PR adds a new presubmit `core_deps_from_source` which depends on googleapis/synthtool#2061 The presubmit will install core dependencies from source in order to get early feedback on changes made at HEAD of dependencies.
1 parent 38d410a commit 057bc23

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

.github/workflows/unittest.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ jobs:
4949
with:
5050
name: coverage-artifact-${{ '{{' }} matrix.python {{ '}}' }}
5151
path: .coverage-${{ matrix.python }}
52-
prerelease:
52+
unit-extended:
53+
name: ${{ matrix.option }}
5354
runs-on: ubuntu-latest
5455
strategy:
5556
matrix:
56-
python: ['3.13']
57+
python: ["3.13"]
58+
option: ["prerelease", "core_deps_from_source"]
5759
steps:
5860
- name: Checkout
5961
uses: actions/checkout@v4
@@ -70,10 +72,10 @@ jobs:
7072
run: |
7173
python -m pip install --upgrade setuptools pip wheel
7274
python -m pip install nox
73-
- name: Run prerelease tests
75+
- name: Run ${{ matrix.option }} tests
7476
env:
7577
BUILD_TYPE: presubmit
76-
TEST_TYPE: prerelease
78+
TEST_TYPE: ${{ matrix.option }}
7779
PY_VERSION: ${{ matrix.python }}
7880
run: |
7981
ci/run_conditional_tests.sh

ci/run_conditional_tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
# This script requires the following environment variables to be set:
1717
# `BUILD_TYPE` should be one of ["presubmit", "continuous"]
18-
# `TEST_TYPE` should be one of ["lint", "lint_setup_py", "docs", "docfx", "prerelease", "unit"]
18+
# `TEST_TYPE` should be one of ["docs", "docfx", "prerelease", "unit"]
19+
# or match the name of the nox session that you want to run.
1920
# `PY_VERSION` should be one of ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
2021

2122
# `TEST_TYPE` and `PY_VERSION` are required by the script `ci/run_single_test.sh`

ci/run_single_test.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ fi
4040
set +e
4141

4242
case ${TEST_TYPE} in
43-
lint)
44-
nox -s lint
45-
retval=$?
46-
;;
47-
lint_setup_py)
48-
nox -s lint_setup_py
49-
retval=$?
50-
;;
5143
docs)
5244
nox -s docs
5345
# This line needs to be directly after `nox -s docs` in order
@@ -103,9 +95,16 @@ case ${TEST_TYPE} in
10395
retval=$?
10496
;;
10597
*)
98+
echo "unsupported PY_VERSION"
99+
exit 1
106100
;;
107101
esac
108-
esac
102+
;;
103+
*)
104+
nox -s ${TEST_TYPE}
105+
retval=$?
106+
;;
107+
esac
109108

110109
# Clean up `__pycache__` and `.nox` directories to avoid error
111110
# `No space left on device` seen when running tests in Github Actions

0 commit comments

Comments
 (0)