Temp/it load test #448
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
name: Java PR | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
paths: | |
# - '**.java' | |
# - '**.xml' | |
# # Include python files and Dockerfiles used for YAML and xlang templates. | |
# - '**.py' | |
# - 'plugins/core-plugin/src/main/resources/**' | |
# # Include relevant GitHub Action files for running these checks. | |
# # This will make it easier to verify action changes don't break anything. | |
# - '.github/actions/setup-env/*' | |
# - '.github/workflows/java-pr.yml' | |
# # Exclude spanner paths from global run (covered in https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/.github/workflows/spanner-pr.yml) | |
# - '!v2/datastream-to-spanner/**' | |
# - '!v2/spanner-common/**' | |
# - '!v2/spanner-change-streams-to-sharded-file-sink/**' | |
# - '!v2/gcs-to-sourcedb/**' | |
# - '!v2/spanner-migrations-sdk/**' | |
# - '!v2/spanner-custom-shard/**' | |
# - '!v2/sourcedb-to-spanner/**' | |
- 'v2/spanner-to-sourcedb/**.java' | |
- 'v2/spanner-to-sourcedb/**.xml' | |
- 'v2/spanner-to-sourcedb/**.py' | |
schedule: | |
- cron: "0 */12 * * *" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
MAVEN_OPTS: -Dorg.slf4j.simpleLogger.log.org.apache.maven.plugins.shade=error | |
permissions: read-all | |
jobs: | |
spotless_check: | |
name: Spotless | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
- name: Setup Environment | |
id: setup-env | |
uses: ./.github/actions/setup-env | |
- name: Run Spotless | |
run: ./cicd/run-spotless | |
checkstyle_check: | |
name: Checkstyle | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
- name: Setup Environment | |
id: setup-env | |
uses: ./.github/actions/setup-env | |
- name: Run Checkstyle | |
run: ./cicd/run-checkstyle | |
java_build: | |
name: Build | |
timeout-minutes: 60 | |
runs-on: [self-hosted, it] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
- name: Setup Environment | |
id: setup-env | |
uses: ./.github/actions/setup-env | |
- name: Run Build | |
run: ./cicd/run-build | |
# mvn -B clean install -f pom.xml -e -Dmdep.analyze.skip -Djib.skip -DskipShade -Dspotless.check.skip -Dmaven.test.skip -T3 --settings=.mvn/settings.xml -pl v2/spanner-to-sourcedb -am | |
- name: Cleanup Java Environment | |
uses: ./.github/actions/cleanup-java-env | |
# java_unit_tests: | |
# name: Unit Tests | |
# needs: [java_build] | |
# timeout-minutes: 60 | |
# runs-on: [self-hosted, it] | |
# steps: | |
# - name: Checkout Code | |
# uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
# - name: Setup Environment | |
# id: setup-env | |
# uses: ./.github/actions/setup-env | |
# - name: Run Unit Tests | |
# run: ./cicd/run-unit-tests | |
## mvn -B clean verify -f pom.xml -e -Dcheckstyle.skip -Djib.skip -DskipShade -Dspotless.check.skip -DskipIntegrationTests -fae -T8 --settings=.mvn/settings.xml -pl v2/spanner-to-sourcedb -am | |
# - name: Upload Unit Tests Report | |
# uses: actions/upload-artifact@v4 | |
# if: always() | |
# with: | |
# name: surefire-test-results | |
# path: '**/surefire-reports/TEST-*.xml' | |
# retention-days: 1 | |
# - name: Upload coverage reports to Codecov | |
# uses: codecov/[email protected] | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# slug: ollionorg/DataflowTemplates-fork | |
# files: 'target/site/jacoco-aggregate/jacoco.xml' | |
# version: v0.6.0 | |
# - name: Cleanup Java Environment | |
# uses: ./.github/actions/cleanup-java-env | |
# if: always() | |
# java_integration_smoke_tests_templates: | |
# name: Dataflow Templates Integration Smoke Tests | |
# needs: [spotless_check, checkstyle_check, java_build, java_unit_tests] | |
# timeout-minutes: 60 | |
# runs-on: [self-hosted, it] | |
# steps: | |
# - name: Checkout Code | |
# uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
# - name: Setup Environment | |
# id: setup-env | |
# uses: ./.github/actions/setup-env | |
# - name: Run Integration Smoke Tests | |
# run: | | |
# ./cicd/run-it-smoke-tests \ | |
# --modules-to-build="v2/spanner-to-sourcedb" \ | |
# --it-region="asia-south1" \ | |
# --it-project="daring-fiber-439305-v4" \ | |
# --it-artifact-bucket="ollion-teleport-testing" \ | |
# --it-private-connectivity="datastream-private-connect-asia-south1" | |
# - name: Upload Smoke Tests Report | |
# uses: actions/upload-artifact@v4 | |
# if: always() | |
# with: | |
# name: surefire-test-results | |
# path: '**/surefire-reports/TEST-*.xml' | |
# retention-days: 1 | |
# - name: Cleanup Java Environment | |
# uses: ./.github/actions/cleanup-java-env | |
# if: always() | |
# java_integration_tests_templates: | |
# name: Dataflow Templates Integration Tests | |
# needs: [java_integration_smoke_tests_templates] | |
# timeout-minutes: 240 | |
# runs-on: [self-hosted, it] | |
# steps: | |
# - name: Checkout Code | |
# uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
# - name: Setup Environment | |
# id: setup-env | |
# uses: ./.github/actions/setup-env | |
# - name: Run Integration Tests | |
# run: | | |
# ./cicd/run-it-tests \ | |
# --modules-to-build="v2/spanner-to-sourcedb" \ | |
# --it-region="asia-south1" \ | |
# --it-project="daring-fiber-439305-v4" \ | |
# --it-artifact-bucket="ollion-teleport-testing" \ | |
# --it-private-connectivity="datastream-private-connect-asia-south1" | |
# - name: Upload Integration Tests Report | |
# uses: actions/upload-artifact@v4 | |
# if: always() | |
# with: | |
# name: surefire-test-results | |
# path: '**/surefire-reports/TEST-*.xml' | |
# retention-days: 1 | |
# - name: Cleanup Java Environment | |
# uses: ./.github/actions/cleanup-java-env | |
# if: always() | |
java_load_tests_templates: | |
name: Dataflow Templates Load Tests | |
needs: [spotless_check, checkstyle_check, java_build] | |
timeout-minutes: 600 | |
runs-on: [self-hosted] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
- name: Setup Environment | |
id: setup-env | |
uses: ./.github/actions/setup-env | |
- name: Run Load Tests | |
run: | | |
./cicd/run-load-tests \ | |
--it-region="asia-south1" \ | |
--it-project="daring-fiber-439305-v4" \ | |
--it-artifact-bucket="ollion-teleport-testing" \ | |
--it-private-connectivity="datastream-private-connect-asia-south1" | |
--modules-to-build="v2/spanner-to-sourcedb" | |
- name: Cleanup Java Environment | |
uses: ./.github/actions/cleanup-java-env | |
if: always() |