Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add a configuration checker #10761

Merged
merged 11 commits into from
May 7, 2024
41 changes: 29 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
- name: Get current week within the year
id: date
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{matrix.java}}
- run: java -version
- uses: actions/cache@v3
- uses: actions/cache@v4
id: mvn-cache
with:
path: ~/.m2/repository
Expand All @@ -50,8 +50,8 @@ jobs:
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
Expand All @@ -67,13 +67,13 @@ jobs:
- name: Get current week within the year
id: date
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- run: java -version
- uses: actions/cache@v3
- uses: actions/cache@v4
id: mvn-cache
with:
path: ~/.m2/repository
Expand All @@ -87,8 +87,8 @@ jobs:
- name: Get current week within the year
id: date
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
Expand All @@ -102,8 +102,8 @@ jobs:
gapic-libraries-bom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
Expand All @@ -115,6 +115,23 @@ jobs:
uses: googleapis/java-cloud-bom/tests/[email protected]
with:
bom-path: gapic-libraries-bom/pom.xml
generation-config-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: validate generation configuration
shell: bash
run: |
docker run \
--rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):${workspace_name}" \
--entrypoint python \
gcr.io/cloud-devrel-public-resources/java-library-generation:"${library_generation_image_tag}" \
/src/cli/entry_point.py validate-generation-config
Copy link
Contributor

@diegomarquezp diegomarquezp May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to avoid specifying a custom entrypoint, it may be more convenient to have our docker image with ENTRYPOINT [ 'python', '/src/cli/entry_point.py' ] instead of ENTRYPOINT [ 'python', '/src/cli/entrypoint.py', 'generate' ]. Just a nice to have

env:
library_generation_image_tag: 2.40.0
workspace_name: /workspace

# TODO: Uncomment the needed Github Actions
# dependencies:
Expand Down
Loading