Skip to content

Commit cca01f6

Browse files
committed
address PR feedback
1 parent ac7f6f2 commit cca01f6

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.generator/cli.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ def handle_build(dry_run=False):
7272
dest="command", required=True, help="Available commands"
7373
)
7474

75+
# This flag is needed for testing.
76+
parser.add_argument(
77+
"--dry-run",
78+
action="store_true",
79+
help="Perform a dry run for testing purposes."
80+
)
81+
7582
# Define commands
7683
for command_name, help_text in [
7784
("configure", "Onboard a new library or an api path to Librarian workflow."),
@@ -91,4 +98,4 @@ def handle_build(dry_run=False):
9198
sys.exit(1)
9299

93100
args = parser.parse_args()
94-
args.func(args)
101+
args.func(dry_run=args.dry_run)

.github/workflows/generator.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ jobs:
2222
uses: actions/setup-python@v5
2323
with:
2424
python-version: "3.10"
25-
- name: Install pytest
25+
- name: Install dependencies
2626
run: |
27-
python -m pip install pytest
27+
python -m pip install --upgrade pip
28+
pip install -r .generator/requirements-test.in
2829
- name: Run generator_cli tests
2930
run: |
3031
pytest .generator/test_cli.py

0 commit comments

Comments
 (0)