Skip to content

Commit

Permalink
build: add presubmits for unit tests in golden files (#2224)
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea authored Oct 16, 2024
1 parent 1b4373a commit 8556c3b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
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:
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

0 comments on commit 8556c3b

Please sign in to comment.