feat: Universe Domain Environment Variable Support #991
Workflow file for this run
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- library_generation/** | |
workflow_dispatch: | |
name: verify_library_generation | |
jobs: | |
integration_tests: | |
strategy: | |
matrix: | |
java: [ 11 ] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: temurin | |
cache: maven | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: install pyenv | |
shell: bash | |
run: | | |
set -ex | |
curl https://pyenv.run | bash | |
# setup environment | |
export PYENV_ROOT="$HOME/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
echo "PYENV_ROOT=${PYENV_ROOT}" >> $GITHUB_ENV | |
echo "PATH=${PATH}" >> $GITHUB_ENV | |
set +ex | |
- name: install python dependencies | |
shell: bash | |
run: | | |
set -ex | |
pushd library_generation | |
pip install -r requirements.in | |
pip install . | |
popd | |
- name: Run integration tests | |
shell: bash | |
run: | | |
set -x | |
git config --global user.email "[email protected]" | |
git config --global user.name "Github Workflow" | |
python -m unittest library_generation/test/integration_tests.py | |
unit_tests: | |
strategy: | |
matrix: | |
java: [ 8 ] | |
os: [ ubuntu-22.04, macos-12 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install utils (macos) | |
if: matrix.os == 'macos-12' | |
shell: bash | |
run: | | |
brew update --preinstall | |
brew install coreutils | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: install python dependencies | |
shell: bash | |
run: | | |
set -ex | |
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 | |
library_generation/test/generate_library_unit_tests.sh | |
- name: Run python unit tests | |
run: | | |
set -x | |
python -m unittest library_generation/test/unit_tests.py | |
lint-shell: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run ShellCheck | |
uses: ludeeus/[email protected] | |
with: | |
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)" |