paul-rogers commented on code in PR #13518: URL: https://github.com/apache/druid/pull/13518#discussion_r1052438026
########## .github/scripts/unit_tests_script.sh: ########## @@ -0,0 +1,77 @@ +# 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. + +#!/bin/bash + +set -e + +unset _JAVA_OPTIONS + +# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid intermittent connection timeouts when +# resolving the SIGAR dependency. +MAVEN_OPTS='-Xmx2048m' ${MVN} test -pl ${MAVEN_PROJECTS} \ +${MAVEN_SKIP} -Dremoteresources.skip=true -Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL} +sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0" +free -m +${MVN} -pl ${MAVEN_PROJECTS} jacoco:report + +# Determine the modified files that match the maven projects being tested. We use maven project lists that +# either exclude (starts with "!") or include (does not start with "!"), so both cases need to be handled. +# If the build is triggered by a tag, an error will be printed, but `all_files` will be correctly set to empty +# so that the coverage check is skipped. +all_files="$(git diff --name-only origin/${GITHUB_BASE_REF}...HEAD | grep "\.java$" || [[ $? == 1 ]])" + +for f in ${all_files} +do + echo $f # for debugging +done + +if [[ "${MAVEN_PROJECTS}" = \!* ]] +then + regex="${MAVEN_PROJECTS:1}" + regex="^${regex//,\!/\\|^}" + project_files="$(echo "${all_files}" | grep -v "${regex}" || [[ $? == 1 ]])" +else + regex="^${MAVEN_PROJECTS//,/\\|^}" + project_files="$(echo "${all_files}" | grep "${regex}" || [[ $? == 1 ]])" +fi + +for f in ${project_files} +do + echo $f # for debugging +done + +# Check diff code coverage for the maven projects being tested (retry install in case of network error). +# Currently, the function coverage check is not reliable, so it is disabled. +if [ -n "${project_files}" ] +then + { for i in 1 2 3; do npm install @connectis/[email protected] && break || sleep 15; done } + git diff origin/${GITHUB_BASE_REF}...HEAD -- ${project_files} | + node_modules/.bin/diff-test-coverage \ + --coverage "**/target/site/jacoco/jacoco.xml" \ + --type jacoco \ + --line-coverage 50 \ + --branch-coverage 50 \ + --function-coverage 0 \ + --log-template "coverage-lines-complete" \ + --log-template "coverage-files-complete" \ + --log-template "totals-complete" \ + --log-template "errors" \ + -- || + { printf "\n\n****FAILED****\nDiff code coverage check failed. To view coverage report, run 'mvn clean test jacoco:report' and open 'target/site/jacoco/index.html'\nFor more details on how to run code coverage locally, follow instructions here - https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md#running-code-coverage-locally\n\n" && false; } +fi + +{ for i in 1 2 3; do curl -o codecov.sh -s https://codecov.io/bash && break || sleep 15; done } +{ for i in 1 2 3; do bash codecov.sh -X gcov && break || sleep 15; done } Review Comment: Nit: Missing newline ########## .github/scripts/unit_tests_script.sh: ########## @@ -0,0 +1,77 @@ +# 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. + +#!/bin/bash Review Comment: The shebang must be the first line in the file and must precede the header comment. ########## .github/scripts/unit_tests_script.sh: ########## @@ -0,0 +1,77 @@ +# 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. + +#!/bin/bash + +set -e + +unset _JAVA_OPTIONS + +# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid intermittent connection timeouts when +# resolving the SIGAR dependency. +MAVEN_OPTS='-Xmx2048m' ${MVN} test -pl ${MAVEN_PROJECTS} \ +${MAVEN_SKIP} -Dremoteresources.skip=true -Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL} +sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0" +free -m +${MVN} -pl ${MAVEN_PROJECTS} jacoco:report + +# Determine the modified files that match the maven projects being tested. We use maven project lists that +# either exclude (starts with "!") or include (does not start with "!"), so both cases need to be handled. +# If the build is triggered by a tag, an error will be printed, but `all_files` will be correctly set to empty +# so that the coverage check is skipped. +all_files="$(git diff --name-only origin/${GITHUB_BASE_REF}...HEAD | grep "\.java$" || [[ $? == 1 ]])" + +for f in ${all_files} +do + echo $f # for debugging Review Comment: Echoing the files is good. Echoing a prefix is better so that us non-experts know the meaning of the files. ```bash echo "Changed files:" ``` ########## .github/scripts/unit_tests_script.sh: ########## @@ -0,0 +1,77 @@ +# 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. + +#!/bin/bash + +set -e + +unset _JAVA_OPTIONS + +# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid intermittent connection timeouts when +# resolving the SIGAR dependency. +MAVEN_OPTS='-Xmx2048m' ${MVN} test -pl ${MAVEN_PROJECTS} \ +${MAVEN_SKIP} -Dremoteresources.skip=true -Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL} +sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0" +free -m Review Comment: What does this do? ########## .github/scripts/unit_tests_script.sh: ########## @@ -0,0 +1,77 @@ +# 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. + +#!/bin/bash + +set -e + +unset _JAVA_OPTIONS + +# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid intermittent connection timeouts when +# resolving the SIGAR dependency. +MAVEN_OPTS='-Xmx2048m' ${MVN} test -pl ${MAVEN_PROJECTS} \ +${MAVEN_SKIP} -Dremoteresources.skip=true -Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL} +sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0" +free -m +${MVN} -pl ${MAVEN_PROJECTS} jacoco:report + +# Determine the modified files that match the maven projects being tested. We use maven project lists that +# either exclude (starts with "!") or include (does not start with "!"), so both cases need to be handled. +# If the build is triggered by a tag, an error will be printed, but `all_files` will be correctly set to empty +# so that the coverage check is skipped. +all_files="$(git diff --name-only origin/${GITHUB_BASE_REF}...HEAD | grep "\.java$" || [[ $? == 1 ]])" + +for f in ${all_files} +do + echo $f # for debugging +done + +if [[ "${MAVEN_PROJECTS}" = \!* ]] +then + regex="${MAVEN_PROJECTS:1}" + regex="^${regex//,\!/\\|^}" + project_files="$(echo "${all_files}" | grep -v "${regex}" || [[ $? == 1 ]])" +else + regex="^${MAVEN_PROJECTS//,/\\|^}" + project_files="$(echo "${all_files}" | grep "${regex}" || [[ $? == 1 ]])" +fi + +for f in ${project_files} +do + echo $f # for debugging +done + +# Check diff code coverage for the maven projects being tested (retry install in case of network error). +# Currently, the function coverage check is not reliable, so it is disabled. +if [ -n "${project_files}" ] +then + { for i in 1 2 3; do npm install @connectis/[email protected] && break || sleep 15; done } + git diff origin/${GITHUB_BASE_REF}...HEAD -- ${project_files} | + node_modules/.bin/diff-test-coverage \ + --coverage "**/target/site/jacoco/jacoco.xml" \ + --type jacoco \ + --line-coverage 50 \ + --branch-coverage 50 \ + --function-coverage 0 \ + --log-template "coverage-lines-complete" \ + --log-template "coverage-files-complete" \ + --log-template "totals-complete" \ + --log-template "errors" \ + -- || + { printf "\n\n****FAILED****\nDiff code coverage check failed. To view coverage report, run 'mvn clean test jacoco:report' and open 'target/site/jacoco/index.html'\nFor more details on how to run code coverage locally, follow instructions here - https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md#running-code-coverage-locally\n\n" && false; } +fi + +{ for i in 1 2 3; do curl -o codecov.sh -s https://codecov.io/bash && break || sleep 15; done } +{ for i in 1 2 3; do bash codecov.sh -X gcov && break || sleep 15; done } Review Comment: These retries seem odd, as noted above. If we are going to retry, should we not retry the build as well? The build will pull down dozens of jars, some of which fail (according to the SIGAR comment above.) ########## .github/scripts/unit_tests_script.sh: ########## @@ -0,0 +1,77 @@ +# 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. + +#!/bin/bash + +set -e + +unset _JAVA_OPTIONS + +# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid intermittent connection timeouts when +# resolving the SIGAR dependency. +MAVEN_OPTS='-Xmx2048m' ${MVN} test -pl ${MAVEN_PROJECTS} \ +${MAVEN_SKIP} -Dremoteresources.skip=true -Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL} +sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0" +free -m +${MVN} -pl ${MAVEN_PROJECTS} jacoco:report + +# Determine the modified files that match the maven projects being tested. We use maven project lists that +# either exclude (starts with "!") or include (does not start with "!"), so both cases need to be handled. +# If the build is triggered by a tag, an error will be printed, but `all_files` will be correctly set to empty +# so that the coverage check is skipped. +all_files="$(git diff --name-only origin/${GITHUB_BASE_REF}...HEAD | grep "\.java$" || [[ $? == 1 ]])" + +for f in ${all_files} +do + echo $f # for debugging +done + +if [[ "${MAVEN_PROJECTS}" = \!* ]] +then + regex="${MAVEN_PROJECTS:1}" + regex="^${regex//,\!/\\|^}" + project_files="$(echo "${all_files}" | grep -v "${regex}" || [[ $? == 1 ]])" +else + regex="^${MAVEN_PROJECTS//,/\\|^}" + project_files="$(echo "${all_files}" | grep "${regex}" || [[ $? == 1 ]])" +fi + +for f in ${project_files} +do + echo $f # for debugging +done + +# Check diff code coverage for the maven projects being tested (retry install in case of network error). +# Currently, the function coverage check is not reliable, so it is disabled. +if [ -n "${project_files}" ] +then + { for i in 1 2 3; do npm install @connectis/[email protected] && break || sleep 15; done } Review Comment: This would ideally be done during a setup phase, not here. Retrying here seems silly: why on three tries? What happens if the third try doesn't work? ########## .github/scripts/unit_tests_script.sh: ########## @@ -0,0 +1,77 @@ +# 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. + +#!/bin/bash + Review Comment: It is helpful for us reviewers if the script contains a description of its purpose. Is this meant to be used only for GHA? To run only the UTs? We need it because...? That is, what does this do that a simple Maven command won't do? ########## .github/scripts/unit_tests_script.sh: ########## @@ -0,0 +1,77 @@ +# 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. + +#!/bin/bash + +set -e + +unset _JAVA_OPTIONS + +# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid intermittent connection timeouts when +# resolving the SIGAR dependency. +MAVEN_OPTS='-Xmx2048m' ${MVN} test -pl ${MAVEN_PROJECTS} \ +${MAVEN_SKIP} -Dremoteresources.skip=true -Ddruid.generic.useDefaultValueForNull=${DRUID_USE_DEFAULT_VALUE_FOR_NULL} +sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0" +free -m +${MVN} -pl ${MAVEN_PROJECTS} jacoco:report + +# Determine the modified files that match the maven projects being tested. We use maven project lists that +# either exclude (starts with "!") or include (does not start with "!"), so both cases need to be handled. +# If the build is triggered by a tag, an error will be printed, but `all_files` will be correctly set to empty +# so that the coverage check is skipped. +all_files="$(git diff --name-only origin/${GITHUB_BASE_REF}...HEAD | grep "\.java$" || [[ $? == 1 ]])" + +for f in ${all_files} +do + echo $f # for debugging +done + +if [[ "${MAVEN_PROJECTS}" = \!* ]] +then + regex="${MAVEN_PROJECTS:1}" + regex="^${regex//,\!/\\|^}" + project_files="$(echo "${all_files}" | grep -v "${regex}" || [[ $? == 1 ]])" +else + regex="^${MAVEN_PROJECTS//,/\\|^}" + project_files="$(echo "${all_files}" | grep "${regex}" || [[ $? == 1 ]])" +fi + +for f in ${project_files} Review Comment: Again, would be good to emit another prefix so we can separate the two lists of files in the output. ########## .github/scripts/unit_tests_script.sh: ########## @@ -0,0 +1,77 @@ +# 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. + +#!/bin/bash + +set -e + +unset _JAVA_OPTIONS + +# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid intermittent connection timeouts when Review Comment: Skipping remote dependencies is odd. If we've cached all the required dependencies, then Maven should not be going upstream. If we've not cached, then the build will fail if it can't go upstream. So, I wonder if we've looked into the issue we're trying to solve: *why* was maven trying to hit SIGAR? Why are things not cached? And, if they are cached, why isn't Maven using them? ########## .github/workflows/unit-tests.yml: ########## @@ -0,0 +1,95 @@ +# 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: (openjdk8) Unit Tests CI +on: + push: + branches: + - master + - /^\d+\.\d+\.\d+(-\S*)?$/ # release branches + pull_request: + branches: + - master + - /^\d+\.\d+\.\d+(-\S*)?$/ # release branches + +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + +env: + MVN: mvn -B + MAVEN_SKIP: -P skip-static-checks -Dweb.console.skip=true -Dmaven.javadoc.skip=true + MAVEN_SKIP_TESTS: -P skip-tests + MAVEN_OPTS: -Xmx3000m + FORCE_COLOR: 2 + +jobs: + unit-tests: + strategy: + matrix: + DRUID_USE_DEFAULT_VALUE_FOR_NULL: [ false, true ] + runs-on: ubuntu-latest + steps: + - name: checkout branch + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: setup jdk8 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 8 + cache: 'maven' + + - name: maven install + run: | + echo 'Running Maven install...' && + ${MVN} clean install -q -ff -pl '!distribution,!:druid-it-image,!:druid-it-cases' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C && + ${MVN} install -q -ff -pl 'distribution' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} + + - name: setup variables + run: | + export base_ref=${{ github.base_ref }} + echo "GITHUB_BASE_REF=${base_ref}" >> $GITHUB_ENV + export druid_use_default_value_for_null=${{ matrix.DRUID_USE_DEFAULT_VALUE_FOR_NULL }} + echo "DRUID_USE_DEFAULT_VALUE_FOR_NULL=${druid_use_default_value_for_null}" >> $GITHUB_ENV + + - name: fetch base branch for test coverage + if: ${{ github.base_ref != '' }} + run: | + # Add merge target branch to determine diff. + # This is not needed for build triggered by tags, since there will be no code diff. + git remote set-branches --add origin ${GITHUB_BASE_REF} && git fetch + + - name: "(openjdk8) indexing modules test" + env: + MAVEN_PROJECTS: indexing-hadoop,indexing-service,extensions-core/kafka-indexing-service,extensions-core/kinesis-indexing-service + run: ./.github/scripts/unit_tests_script.sh + + - name: "(openjdk8) processing module test" + env: + MAVEN_PROJECTS: processing + run: ./.github/scripts/unit_tests_script.sh + + - name: "(openjdk8) server module test" + env: + MAVEN_PROJECTS: server + run: ./.github/scripts/unit_tests_script.sh + + - name: "(openjdk8) other modules test" + env: + MAVEN_PROJECTS: '!processing,!indexing-hadoop,!indexing-service,!extensions-core/kafka-indexing-service,!extensions-core/kinesis-indexing-service,!server,!web-console,!integration-tests,!:druid-it-tools,!:druid-it-image,!:druid-it-cases' + run: ./.github/scripts/unit_tests_script.sh Review Comment: Nit: missing newline ########## .github/workflows/unit-tests.yml: ########## @@ -0,0 +1,95 @@ +# 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: (openjdk8) Unit Tests CI +on: + push: + branches: + - master + - /^\d+\.\d+\.\d+(-\S*)?$/ # release branches + pull_request: + branches: + - master + - /^\d+\.\d+\.\d+(-\S*)?$/ # release branches + +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + +env: + MVN: mvn -B + MAVEN_SKIP: -P skip-static-checks -Dweb.console.skip=true -Dmaven.javadoc.skip=true + MAVEN_SKIP_TESTS: -P skip-tests + MAVEN_OPTS: -Xmx3000m + FORCE_COLOR: 2 + +jobs: + unit-tests: + strategy: + matrix: + DRUID_USE_DEFAULT_VALUE_FOR_NULL: [ false, true ] + runs-on: ubuntu-latest + steps: + - name: checkout branch + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: setup jdk8 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 8 + cache: 'maven' + + - name: maven install + run: | + echo 'Running Maven install...' && + ${MVN} clean install -q -ff -pl '!distribution,!:druid-it-image,!:druid-it-cases' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C && + ${MVN} install -q -ff -pl 'distribution' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} Review Comment: I wonder, why are we doing a checkout of sources, then doing a build? At one point, a goal of this project was to do the checkout and build once, then reuse the same artifacts for each step so that we test what we ship. Have we found we must move away from that? Builds are costly. Are we at least doing one build for each Java version? Or, are we doing one per Java version per group of ITs? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
