From d741e2742040b5dcfeb30863db513e44e44f1c0d Mon Sep 17 00:00:00 2001 From: Emilio Lahr-Vivaz Date: Tue, 17 Sep 2024 18:30:49 -0400 Subject: [PATCH] move integration tests to regular build --- .github/workflows/build-and-test.yml | 41 +++++++++++-------- .github/workflows/integration-tests-2.12.yml | 33 --------------- ...n-tests-2.13.yml => integration-tests.yml} | 34 ++++++++------- .../{module-unit-tests.yml => unit-tests.yml} | 0 4 files changed, 43 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/integration-tests-2.12.yml rename .github/workflows/{integration-tests-2.13.yml => integration-tests.yml} (51%) rename .github/workflows/{module-unit-tests.yml => unit-tests.yml} (100%) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7f5f9f45a3bf..f396ec683e3a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -46,109 +46,114 @@ jobs: run: rm -rf ~/.m2/repository/org/locationtech/geomesa accumulo-ds-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -pl :geomesa-accumulo-datastore_${{ inputs.scala-version }} scala-version: ${{ inputs.scala-version }} accumulo-other-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-accumulo -pl -:geomesa-accumulo-datastore_${{ inputs.scala-version }} scala-version: ${{ inputs.scala-version }} arrow-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-arrow scala-version: ${{ inputs.scala-version }} cassandra-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-cassandra scala-version: ${{ inputs.scala-version }} convert-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-convert scala-version: ${{ inputs.scala-version }} cqengine-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-cqengine-parent scala-version: ${{ inputs.scala-version }} features-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-features scala-version: ${{ inputs.scala-version }} fs-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-fs scala-version: ${{ inputs.scala-version }} gt-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-gt scala-version: ${{ inputs.scala-version }} hbase-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-hbase scala-version: ${{ inputs.scala-version }} kafka-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-kafka scala-version: ${{ inputs.scala-version }} lambda-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-lambda scala-version: ${{ inputs.scala-version }} metrics-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-metrics scala-version: ${{ inputs.scala-version }} process-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-process scala-version: ${{ inputs.scala-version }} redis-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-redis scala-version: ${{ inputs.scala-version }} spark-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-spark scala-version: ${{ inputs.scala-version }} utils-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -f geomesa-utils-parent scala-version: ${{ inputs.scala-version }} other-tests: needs: build-scala - uses: ./.github/workflows/module-unit-tests.yml + uses: ./.github/workflows/unit-tests.yml with: module-selector: -pl geomesa-filter,geomesa-index-api,geomesa-jobs,geomesa-security,geomesa-tools,geomesa-z3 scala-version: ${{ inputs.scala-version }} + integration-tests: + needs: build-scala + uses: ./.github/workflows/integration-tests.yml + with: + scala-version: ${{ inputs.scala-version }} diff --git a/.github/workflows/integration-tests-2.12.yml b/.github/workflows/integration-tests-2.12.yml deleted file mode 100644 index fe62f9cb5460..000000000000 --- a/.github/workflows/integration-tests-2.12.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: integration-tests-2.12 - -on: - push: - pull_request: - -permissions: # added using https://github.com/step-security/secure-repo - contents: read - -env: - MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dlicense.skip=true --batch-mode - MAVEN_TEST_OPTS: -Dtest.fork.count=1 - -jobs: - build-scala: - runs-on: ubuntu-latest - # avoid duplicate jobs on PRs from the main repo - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name - - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2 - with: - distribution: 'temurin' - java-version: '11' - cache: 'maven' - - name: Build with Maven - run: ./build/mvn clean install $MAVEN_CLI_OPTS -DskipTests -T4 - - name: Integration Tests - run: mvn failsafe:integration-test failsafe:verify $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS - - name: Remove geomesa artifacts - if: success() || failure() - run: rm -rf ~/.m2/repository/org/locationtech/geomesa diff --git a/.github/workflows/integration-tests-2.13.yml b/.github/workflows/integration-tests.yml similarity index 51% rename from .github/workflows/integration-tests-2.13.yml rename to .github/workflows/integration-tests.yml index 55ee08d2a7b2..63f4791aed72 100644 --- a/.github/workflows/integration-tests-2.13.yml +++ b/.github/workflows/integration-tests.yml @@ -1,22 +1,19 @@ -name: integration-tests-2.13 +name: integration-tests on: - push: - pull_request: + workflow_call: + inputs: + scala-version: + required: false + type: string + default: "2.12" permissions: # added using https://github.com/step-security/secure-repo contents: read -env: - MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dlicense.skip=true --batch-mode - MAVEN_TEST_OPTS: -Dtest.fork.count=1 - jobs: - build-scala: + integration-tests: runs-on: ubuntu-latest - # avoid duplicate jobs on PRs from the main repo - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name - steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2 @@ -25,9 +22,18 @@ jobs: java-version: '11' cache: 'maven' - name: Set Scala version - run: ./build/scripts/change-scala-version.sh 2.13 - - name: Build with Maven - run: ./build/mvn clean install $MAVEN_CLI_OPTS -DskipTests -T4 + run: | + echo ./build/scripts/change-scala-version.sh ${{ inputs.scala-version }} + ./build/scripts/change-scala-version.sh ${{ inputs.scala-version }} + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: classes-and-jars + - name: Install artifacts + run: | + tar -xf classes.tgz + mkdir -p ~/.m2/repository/org/locationtech/geomesa + mv m2-geomesa/* ~/.m2/repository/org/locationtech/geomesa/ - name: Integration Tests run: mvn failsafe:integration-test failsafe:verify $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS - name: Remove geomesa artifacts diff --git a/.github/workflows/module-unit-tests.yml b/.github/workflows/unit-tests.yml similarity index 100% rename from .github/workflows/module-unit-tests.yml rename to .github/workflows/unit-tests.yml