Skip to content

Commit

Permalink
Parallel builds
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekagarwal87 committed Jan 8, 2025
1 parent 1a972ef commit 91dabb3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 30 deletions.
1 change: 1 addition & 0 deletions .github/workflows/reusable-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License

## This workflow is invoked for each module that needs to be tested in the unit-tests.yml
name: "Unit Tests shared workflow"
on:
workflow_call:
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/unit-and-integration-tests-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,34 +157,24 @@ jobs:
echo ${{ needs.set-env-var.outputs.DRUID_PREVIOUS_IT_IMAGE_NAME }}
docker save "${{ needs.set-env-var.outputs.DRUID_PREVIOUS_IT_IMAGE_NAME }}" | gzip > druid-container-jdk${{ matrix.jdk }}-version${{ needs.set-env-var.outputs.DRUID_PREVIOUS_VERSION }}.tar.gz
unit-tests-phase2:
unit-tests:
strategy:
fail-fast: false
matrix:
# Use JDK 21.0.4 to work around https://github.com/apache/druid/issues/17429
jdk: [ '11', '21.0.4' ]
jdk: [ '11', '17', '21.0.4' ]
name: "unit tests (jdk${{ matrix.jdk }})"
uses: ./.github/workflows/unit-tests.yml
needs: unit-tests
if: ${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
with:
jdk: ${{ matrix.jdk }}

unit-tests:
name: "unit tests (jdk17)"
uses: ./.github/workflows/unit-tests.yml
needs: build
with:
jdk: 17
jdk: ${{ matrix.jdk }}

standard-its:
needs: unit-tests
if: ${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
needs: build
uses: ./.github/workflows/standard-its.yml

revised-its:
needs: [unit-tests, set-env-var]
if: ${{ always() && (needs.unit-tests.result == 'success' || needs.unit-tests.outputs.continue_tests) }}
needs: [build, set-env-var]
uses: ./.github/workflows/revised-its.yml
with:
BACKWARD_COMPATIBILITY_IT_ENABLED: ${{ needs.set-env-var.outputs.BACKWARD_COMPATIBILITY_IT_ENABLED }}
Expand Down
16 changes: 1 addition & 15 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License

# The workflow is invoked in unit-and-integration-tests-unified.yml
name: "Unit tests workflow"
on:
workflow_call:
Expand All @@ -21,21 +22,6 @@ on:
required: true
type: string
description: 'JDK version used to test Druid'
outputs:
continue_tests:
description: 'Flag to decide if next tests need to run incase coverage issue failures'
value: |
${{
(jobs.indexing_modules_test.result == 'success' || jobs.indexing_modules_test.result == 'skipped' ||
fromJson(jobs.indexing_modules_test.outputs.coverage_failure)) &&
(jobs.processing_modules_test.result == 'success' || jobs.processing_modules_test.result == 'skipped' ||
fromJson(jobs.processing_modules_test.outputs.coverage_failure)) &&
(jobs.server_modules_test.result == 'success' || jobs.server_modules_test.result == 'skipped' || fromJson
(jobs.server_modules_test.outputs.coverage_failure)) &&
(jobs.other_modules_test.result == 'success' || jobs.other_modules_test.result == 'skipped' || fromJson(jobs
.other_modules_test.outputs.coverage_failure))
}}
jobs:
changes:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 91dabb3

Please sign in to comment.