Skip to content

Commit

Permalink
chore: add integration test running in docker container (#2613)
Browse files Browse the repository at this point in the history
In this PR:
- In the integration test, run `generate_repo.py` and
`generate_pr_description.py` in docker container.
- Remove test image in cloud build.

Context: 
In this
[log](https://github.com/googleapis/google-cloud-java/actions/runs/8445620169/job/23133097820),
the nightly generation job only took 3 mins. After investigation, we
found out that removing `main` method in `generate_repo.py` (#2598)
caused the CLI is not running despite that the job returns successfully.

This non-explicit failure demonstrated that there's difference between
calling CLI (`generate` method in `generate_repo.py`) and its
implementation (`generate_from_yaml` method in `generate_repo.py`).

We decided to change the integration test to run the CLI in docker
container, rather than testing `generate_from_yaml` because it is the
containerized CLI will be used in downstream libraries.
  • Loading branch information
JoeWang1127 authored Apr 2, 2024
1 parent d0c5191 commit 56775a6
Show file tree
Hide file tree
Showing 4 changed files with 179 additions and 178 deletions.

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/verify_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ jobs:
shell: bash
run: |
set -x
git config --global user.email "github-workflow@github.com"
git config --global user.name "Github Workflow"
python -m unittest library_generation/test/integration_tests.py
unit_tests:
strategy:
Expand Down
49 changes: 0 additions & 49 deletions library_generation/test/container_integration_tests.sh

This file was deleted.

Loading

0 comments on commit 56775a6

Please sign in to comment.