Add properties to reduce the amount of data fetching from prometheus. #9736
Workflow file for this run
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: docs | |
on: | |
pull_request: | |
paths: | |
- 'docs/**' | |
defaults: | |
run: | |
shell: bash --noprofile --norc -euo pipefail {0} | |
env: | |
# An envar that signals to tests we are executing in the CI environment | |
CONTINUOUS_INTEGRATION: true | |
# allow overriding Maven command | |
MAVEN: ./mvnw | |
# maven.wagon.rto is in millis, defaults to 30m | |
MAVEN_OPTS: "-Xmx512M -XX:+ExitOnOutOfMemoryError -Dmaven.wagon.rto=60000" | |
MAVEN_INSTALL_OPTS: "-Xmx2G -XX:+ExitOnOutOfMemoryError -Dmaven.wagon.rto=60000" | |
MAVEN_FAST_INSTALL: "-B --strict-checksums -V --quiet -T 1C -DskipTests -Dair.check.skip-all" | |
MAVEN_TEST: "-B --strict-checksums -Dair.check.skip-all --fail-at-end" | |
RETRY: .github/bin/retry | |
# Cancel previous PR builds. | |
concurrency: | |
# Cancel all workflow runs except latest within a concurrency group. This is achieved by defining a concurrency group for the PR. | |
# Non-PR builds have singleton concurrency groups. | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
path-filters: | |
runs-on: ubuntu-latest | |
outputs: | |
docs: ${{ steps.filter.outputs.docs }} | |
other: ${{ steps.filter.outputs.other }} | |
steps: | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3 | |
id: filter | |
with: | |
filters: | | |
docs: 'docs/**' | |
other: '!docs/**' | |
docs-checks: | |
needs: path-filters | |
if: ${{ needs.path-filters.outputs.docs == 'true' && needs.path-filters.outputs.other == 'false' }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
timeout-minutes: 10 | |
- name: Maven Checks | |
run: | | |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" | |
$RETRY $MAVEN install -B --strict-checksums -V -T 1C -DskipTests -P ci -am -pl ':trino-docs' | |
- name: Clean local Maven repo | |
# Avoid creating a cache entry because this job doesn't download all dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: rm -rf ~/.m2/repository | |
test-docs: | |
needs: path-filters | |
if: ${{ needs.path-filters.outputs.docs == 'true' && needs.path-filters.outputs.other == 'false' && !contains(github.event.pull_request.labels.*.name, 'release-notes') }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
modules: | |
- ":trino-main" | |
- ":trino-plugin-toolkit" | |
- ":trino-resource-group-managers" | |
- ":trino-tests" | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # checkout all commits, as the build result depends on `git describe` equivalent | |
- uses: ./.github/actions/setup | |
timeout-minutes: 10 | |
- name: Maven Install | |
run: | | |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}" | |
$RETRY $MAVEN install ${MAVEN_FAST_INSTALL} -am -pl $(echo '${{ matrix.modules }}' | cut -d' ' -f1) | |
- name: Maven Tests | |
id: tests | |
run: $MAVEN test ${MAVEN_TEST} -pl ${{ matrix.modules }} | |
- name: Sanitize artifact name | |
if: always() | |
run: | | |
# Generate a valid artifact name and make it available to next steps as | |
# an environment variable ARTIFACT_NAME | |
# ", :, <, >, |, *, ?, \, / are not allowed in artifact names but we only use : so we remove it | |
name=$(echo -n "${{ matrix.modules }}" | sed -e 's/[:]//g') | |
echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV | |
- name: Upload test results | |
uses: ./.github/actions/process-test-results | |
if: always() | |
with: | |
artifact-name: ${{ env.ARTIFACT_NAME }} | |
has-failed-tests: ${{ steps.tests.outcome == 'failure' }} | |
- name: Clean local Maven repo | |
# Avoid creating a cache entry because this job doesn't download all dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: rm -rf ~/.m2/repository |