-
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.
Merge branch 'main' into cancel-timeout-task
- Loading branch information
Showing
99 changed files
with
4,534 additions
and
2,517 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
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 | ||
|
@@ -44,36 +42,15 @@ jobs: | |
set -ex | ||
pushd library_generation | ||
pip install -r requirements.in | ||
pip install . | ||
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: | ||
|
@@ -98,6 +75,21 @@ jobs: | |
pushd library_generation | ||
pip install -r requirements.in | ||
popd | ||
- name: install synthtool | ||
shell: bash | ||
run: | | ||
set -ex | ||
mkdir -p /tmp/synthtool | ||
pushd /tmp/synthtool | ||
if [ ! -d "synthtool" ]; then | ||
git clone https://github.com/googleapis/synthtool.git | ||
fi | ||
pushd "synthtool" | ||
git reset --hard origin/no-java-templates | ||
python3 -m pip install -e . | ||
python3 -m pip install -r requirements.in | ||
- name: Run shell unit tests | ||
run: | | ||
set -x | ||
|
@@ -106,7 +98,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 +108,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/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
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
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
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.