style: spotless apply #17
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: Run Gradle check | |
on: | |
push: | |
branches: | |
- main | |
- releases/* | |
pull_request: | |
jobs: | |
gradle-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: setup xvfb environment | |
run: sudo apt-get install -f -q xvfb libsm-dev libxrender1 libxext-dev libxtst-dev libxcb1-dev fonts-dejavu xfonts-base xfonts-scalable | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
build-scan-publish: true | |
build-scan-terms-of-service-url: https://gradle.com/terms-of-service | |
build-scan-terms-of-service-agree: yes | |
- name: Run gradle build | |
run: xvfb-run -a --server-args='-screen 0, 1024x768x24' ./gradlew -PenvIsCi=true check | |
id: gradle | |
- name: "Add Build Scan URL as PR comment" | |
uses: actions/github-script@v7 | |
if: github.event_name == 'pull_request' && failure() | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `❌ ${{ github.workflow }} **failed**. | |
Please look a Gradle Scan page for details: | |
${{ steps.gradle.outputs.build-scan-url }}` | |
}) |