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

build: add presubmits for unit tests in golden files #2224

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ branchProtectionRules:
- 'integration'
- 'goldens-lint'
- 'goldens-prerelease'
- 'goldens-unit'
- 'style-check'
- 'snippetgen'
- 'unit (3.7)'
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,27 @@ jobs:
nox -f tests/integration/goldens/eventarc/noxfile.py -s mypy-3.12 blacken lint
nox -f tests/integration/goldens/logging/noxfile.py -s mypy-3.12 blacken lint
nox -f tests/integration/goldens/redis/noxfile.py -s mypy-3.12 blacken lint
goldens-unit:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we were using 3.12 as the latest supported Python version. If that's the case, should we be using 3.13 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. I'll update this to Python 3.13 in PR #2215

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install nox.
run: |
python -m pip install nox
- name: Run the `unit` nox session
# Exclude testing for asset which requires dependency google-cloud-org-policy
# in order to run unit tests
# See https://github.com/googleapis/gapic-generator-python/issues/1806
run: |
nox -f tests/integration/goldens/credentials/noxfile.py -s unit-3.12
nox -f tests/integration/goldens/eventarc/noxfile.py -s unit-3.12
nox -f tests/integration/goldens/logging/noxfile.py -s unit-3.12
nox -f tests/integration/goldens/redis/noxfile.py -s unit-3.12
goldens-prerelease:
runs-on: ubuntu-latest
steps:
Expand Down
Loading