Skip to content

Commit

Permalink
Simplify build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ealden committed Feb 12, 2024
1 parent fd09aa0 commit a8a1a18
Showing 1 changed file with 5 additions and 28 deletions.
33 changes: 5 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,13 @@
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonarqube --info
distribution: 'temurin'
java-version: '21'
- run: ./gradlew test

0 comments on commit a8a1a18

Please sign in to comment.