Skip to content

Don't run spotless on check jobs, it's already run as part of the spotless job #6849

Don't run spotless on check jobs, it's already run as part of the spotless job

Don't run spotless on check jobs, it's already run as part of the spotless job #6849

name: Run system tests
on:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 4 * * *
push:
branches:
- master
# Cancel long-running jobs when a new commit is pushed
concurrency:
# this ensures that only one workflow runs at a time for a given branch on pull requests
# as the group key is the workflow name and the branch name
# for scheduled runs and pushes to master, we use the run id to ensure that all runs are executed
group: ${{ (github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.ref)) || format('{0}-{1}', github.workflow, github.run_id) }}
cancel-in-progress: true
jobs:
build:
runs-on:
group: APM Larger Runners
environment:
name: ci-build
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
with:
submodules: 'recursive'
fetch-depth: 0
- name: Cache Gradle dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build dd-trace-java
env:
ORG_GRADLE_PROJECT_akkaRepositoryToken: ${{ secrets.AKKA_REPO_TOKEN }}
run: |
GRADLE_OPTS="-Xms2g -Xmx4g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC" \
JAVA_HOME=$JAVA_HOME_8_X64 \
JAVA_8_HOME=$JAVA_HOME_8_X64 \
JAVA_11_HOME=$JAVA_HOME_11_X64 \
JAVA_17_HOME=$JAVA_HOME_17_X64 \
JAVA_21_HOME=$JAVA_HOME_21_X64 \
./gradlew clean :dd-java-agent:shadowJar \
--build-cache --parallel --stacktrace --no-daemon --max-workers=4
- name: Upload artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: binaries
path: workspace/dd-java-agent/build/libs/
main:
needs:
- build
# If you change the following comment, update the pattern in the update_system_test_reference.sh script to match.
uses: DataDog/system-tests/.github/workflows/system-tests.yml@main # system tests are pinned for releases only
secrets: inherit
permissions:
contents: read
id-token: write
packages: write
with:
library: java
# If you change the following comment, update the pattern in the update_system_test_reference.sh script to match.
ref: main # system tests are pinned for releases only
binaries_artifact: binaries
desired_execution_time: 900 # 15 minutes
scenarios_groups: tracer-release
excluded_scenarios: CROSSED_TRACING_LIBRARIES,INTEGRATIONS_AWS,APM_TRACING_E2E_OTEL,APM_TRACING_E2E_SINGLE_SPAN,PROFILING # require AWS and datadog credentials
skip_empty_scenarios: true
# Ensure the main job is run to completion
check:
name: Check system tests success
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [build, main]
steps:
- name: Fail if build failed
if: ${{ needs.build.result != 'success' }}
run: |
echo "❌ Build job did not succeed: ${{ needs.build.result }}"
exit 1
- name: Fail if main failed or is skipped
if: ${{ needs.main.result != 'success' }}
run: |
echo "❌ Main job did not succeed: ${{ needs.main.result }}"
exit 1
- name: Success
run: echo "✅ All required jobs succeeded."