diff --git a/.github/actions/checkout-and-build/action.yml b/.github/actions/checkout-and-build/action.yml index a15d31b3..0a0c1919 100644 --- a/.github/actions/checkout-and-build/action.yml +++ b/.github/actions/checkout-and-build/action.yml @@ -33,4 +33,4 @@ runs: - name: Build with Maven shell: bash run: | - mvn install -Dmaven.test.skip=${{ inputs.skip_tests_on_build }} \ No newline at end of file + mvn install -Dmaven.test.skip=${{ inputs.skip_tests_on_build }} -Dgpg.skip \ No newline at end of file diff --git a/.github/workflows/ci-docs-compile-tests.yml b/.github/workflows/ci-docs-compile-tests.yml new file mode 100644 index 00000000..f8195e39 --- /dev/null +++ b/.github/workflows/ci-docs-compile-tests.yml @@ -0,0 +1,45 @@ +name: Compile against documentation examples + +on: + workflow_call: + workflow_dispatch: + pull_request: # temporary until it's merged + branches: [ KG-ci-additions ] + push: + branches: [ KG-ci-additions ] + +jobs: + test-compilation: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Install maven + shell: bash + run: | + sudo apt update + sudo apt install maven -y + + - name: Set up JDK 17 + uses: actions/setup-java@v5 + with: + distribution: adopt + java-version: 17 + cache: maven + + - name: Build with Maven + shell: bash + id: build + run: | + mvn install -pl astra-db-java -am -Dmaven.test.skip=true -Dgpg.skip + VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + JAR_PATH="$HOME/.m2/repository/com/datastax/astra/astra-db-java/$VERSION/astra-db-java-$VERSION.jar" + echo "jar_path=$JAR_PATH" >> $GITHUB_OUTPUT + + - name: Run compilation tests + uses: datastax/astra-client-docs-tests/.github/actions/test-compilation@master + with: + clients: 'java' + args: -A java='files(\"${{ steps.build.outputs.jar_path }}\")' + docs-repo-token: ${{ secrets.DOC_GITHUB_PAT_CROSS_ORG }}