ci: Test upper bound dependenices file in Github CI #5
Workflow file for this run
This file contains hidden or 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
name: Dependency Compatibility Test | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
schedule: | |
- cron: '0 1 * * *' # Nightly at 1am | |
jobs: | |
dependency-compatibility-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sdk-platform-java | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
# Set up the for the CI | |
- name: Install sdk-platform-java's modules | |
# gapic-generator-java requires Java 8 and is irrelevant for this CI | |
run: mvn -q -B -ntp install --projects '!gapic-generator-java' -Dcheckstyle.skip -Dfmt.skip -DskipTests -Dclirr.skip -T 1C | |
# Run in the root module which should test for everything barring showcase | |
- name: Perform Dependency Compatibility Testing | |
run: ./.github/scripts/test_dependency_compatibility.sh dependencies.txt | |
# Set up local showcase server | |
- name: Parse showcase version | |
working-directory: java-showcase/gapic-showcase | |
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV" | |
- name: Install showcase server | |
run: | | |
sudo mkdir -p /usr/src/showcase | |
sudo chown -R ${USER} /usr/src/ | |
curl --location https://github.com/googleapis/gapic-showcase/releases/download/v${{env.SHOWCASE_VERSION}}/gapic-showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz --output /usr/src/showcase/showcase-${{env.SHOWCASE_VERSION}}-linux-amd64.tar.gz | |
cd /usr/src/showcase/ | |
tar -xf showcase-* | |
./gapic-showcase run & | |
cd - | |
# Run for the Showcase tests | |
- name: Perform Dependency Compatibility Testing (Showcase) | |
run: ../.github/scripts/test_dependency_compatibility.sh dependencies.txt | |
working-directory: java-showcase |