Skip to content

Cron Job Unit Tests

Cron Job Unit Tests #1

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "Cron Job Unit Tests"
on:
schedule: # Runs by default on master branch
- cron: '0 3 * * 6' # Runs every Saturday at 03:00 AM UTC
jobs:
run-unit-tests:
name: "unit tests"
if: (github.event_name == 'schedule' && github.repository == 'apache/druid')
strategy:
fail-fast: false
matrix:
jdk: [ '11', '21' ]
Dtest: [ "A*,F*,S*", "B*,D*,L*,T*", "C*,O*", "E*,N*,Q*", "G*,R*,U*", "H*,I*,J*", "K*,P*,V*,W*,X*,Y*,Z*", "M*"]
uses: ./.github/workflows/worker.yml
with:
script: .github/scripts/run-unit-tests.sh -Dtest='${{ matrix.Dtest }}' -Dmaven.test.failure.ignore=true
jdk: ${{ matrix.jdk }}
artifact_prefix: "unit-test-reports-${{ matrix.jdk }}"
key: ${{ matrix.Dtest }}
reporting-unit-test-failures:
name: "report-unit-test-failures-${{ matrix.jdk }}"
needs: run-unit-tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
jdk: [ '11', '21' ]
steps:
- name: Download reports for all unit test jobs
uses: actions/download-artifact@v4
with:
pattern: "unit-test-reports-${{ matrix.jdk }}-*"
path: target/surefire-reports
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
with:
check_name: "Unit Test Report (JDK ${{ matrix.jdk }})"
report_paths: '**/target/surefire-reports/TEST-*.xml'
detailed_summary: true
flaky_summary: true
annotate_only: true
fail_on_failure: true
check_retries: true
truncate_stack_traces: false
reporting-jacoco-coverage-failures:
name: "report-jacoco-coverage-failures-${{ matrix.jdk }}"
needs: run-unit-tests
uses: ./.github/workflows/worker.yml
strategy:
fail-fast: false
matrix:
jdk: [ '11', '21' ]
with:
script: .github/scripts/create-jacoco-coverage-report.sh
artifacts_to_download: "unit-test-reports-${{ matrix.jdk }}-*"
key: "jacoco-coverage-report"