-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In this PR: - Add `generate_repo.py` to generate libraries defined in a configuration file. - Regenerate `.repo-metadata.json` - Generate `.OwlBot.yaml` and `owlbot.py` for new clients - Invoke `generate_composed_library.py` to generate multiple versions of a GAPIC library. - Apply repo-level post processing using python - Regenerate root `pom.xml` - Regenerate `gapic-libraries-bom/pom.xml` - Format python script using `black`. - Add unit tests for utility functions. - Add an integration test using python, replacing shell integration tests. - Add a python lint check in CI. This is [step 2](https://docs.google.com/document/d/1JiCcG3X7lnxaJErKe0ES_JkyU7ECb40nf2Xez3gWvuo/edit?pli=1&tab=t.0#bookmark=id.h3n0hcp3ch2m) of milestone 2 of hermetic build project.
- Loading branch information
1 parent
564802b
commit 47b632a
Showing
49 changed files
with
2,085 additions
and
1,845 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,7 @@ jobs: | |
strategy: | ||
matrix: | ||
java: [ 11 ] | ||
os: [ ubuntu-22.04, macos-12 ] | ||
post_processing: [ 'true', 'false' ] | ||
runs-on: ${{ matrix.os }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
|
@@ -45,35 +43,13 @@ jobs: | |
pushd library_generation | ||
pip install -r requirements.in | ||
popd | ||
- name: install utils (macos) | ||
if: matrix.os == 'macos-12' | ||
shell: bash | ||
run: | | ||
brew update --preinstall | ||
# we need the `realpath` command to be available | ||
brew install coreutils | ||
- name: install docker (ubuntu) | ||
if: matrix.os == 'ubuntu-22.04' | ||
shell: bash | ||
run: | | ||
set -x | ||
# install docker | ||
sudo apt install containerd -y | ||
sudo apt install -y docker.io docker-compose | ||
# launch docker | ||
sudo systemctl start docker | ||
- name: Run integration tests | ||
# we don't run ITs with postprocessing on macos because one of its dependencies "synthtool" is designed to run on linux only | ||
if: matrix.os == 'ubuntu-22.04' || matrix.post_processing == 'false' | ||
shell: bash | ||
run: | | ||
set -x | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Github Workflow" | ||
library_generation/test/generate_library_integration_test.sh \ | ||
--googleapis_gen_url https://cloud-java-bot:${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}@github.com/googleapis/googleapis-gen.git \ | ||
--enable_postprocessing "${{ matrix.post_processing }}" | ||
python -m unittest library_generation/test/integration_tests.py | ||
unit_tests: | ||
strategy: | ||
matrix: | ||
|
@@ -106,7 +82,7 @@ jobs: | |
run: | | ||
set -x | ||
python -m unittest library_generation/test/unit_tests.py | ||
lint: | ||
lint-shell: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -116,3 +92,20 @@ jobs: | |
scandir: 'library_generation' | ||
format: tty | ||
severity: error | ||
lint-python: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install python dependencies | ||
shell: bash | ||
run: | | ||
set -ex | ||
pushd library_generation | ||
pip install -r requirements.in | ||
popd | ||
- name: Lint | ||
shell: bash | ||
run: | | ||
# exclude generated golden files | ||
# exclude owlbot until further refaction | ||
black --check library_generation --exclude "(library_generation/owlbot)|(library_generation/test/resources/goldens)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.