fix(deps): update dependency org.apache.httpcomponents.client5:httpcl… #136
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
--- | |
# yamllint disable rule:comments rule:line-length | |
name: Java CI | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
branches: | |
- master | |
- release/* | |
pull_request: | |
branches: | |
- master | |
- release/* | |
jobs: | |
yamllint: | |
name: "\U0001F9F9 yamllint" | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⤵️ Check out configuration from GitHub | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: 🧹 Run yamllint | |
uses: frenck/action-yamllint@4eff2494c5af06cb3d5a2a02505e288978e86d3a # v1.4.2 | |
build: | |
runs-on: ${{ matrix.os }} | |
permissions: | |
checks: write | |
contents: read | |
issues: write | |
pull-requests: write | |
strategy: | |
fail-fast: false | |
matrix: | |
java_version: | |
- "11" | |
- "17" | |
- "21" | |
os: | |
- ubuntu-latest | |
- windows-latest | |
env: | |
JAVA_OPTS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK | |
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java_version }} | |
- name: Cache SonarCloud packages | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' && matrix.os == 'ubuntu-latest' }} | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Build | |
run: ./mvnw --no-transfer-progress -V -B -fae -s .github/settings.xml -e "-DtrimStackTrace=false" "-Dsurefire.rerunFailingTestsCount=1" install | |
- name: Upload Test Reports | |
if: always() | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 | |
with: | |
name: test-reports-${{ matrix.os }}-java${{ matrix.java_version }} | |
path: '**/*-reports' | |
- name: Publish Test Results | |
if: github.event.pull_request.head.repo.full_name == 'dropwizard/dropwizard' | |
uses: scacap/action-surefire-report@6efd3d10b5c1996a0724dd4c4915a073f685fefa # v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
check_name: Test Report (${{ matrix.os }} - Java ${{ matrix.java_version }}) | |
report_paths: '**/*-reports/TEST-*.xml' | |
- name: Analyze with SonarCloud | |
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '17' && matrix.os == 'ubuntu-latest' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./mvnw --no-transfer-progress -V -B -ff -s .github/settings.xml "-Dsonar.projectKey=dropwizard_dropwizard" "-Dsonar.organization=dropwizard" "-Dsonar.host.url=https://sonarcloud.io" org.sonarsource.scanner.maven:sonar-maven-plugin:sonar |