Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Apr 21, 2024
1 parent 0948310 commit 5b971fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
matrix-build:
name: Build and test with Java ${{ matrix.java }}
permissions:
contents: read
strategy:
matrix:
java: ['17', '21']
Expand All @@ -31,7 +33,7 @@ jobs:
key: ${{ runner.os }}-sonar-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-sonar-

- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/wrapper-validation@v3

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
Expand All @@ -50,13 +52,6 @@ jobs:
-PjavaVersion=${{matrix.java}} \
-Dsonar.gradle.skipCompile=true
- name: Publish Test Report for Java ${{ matrix.java }}
uses: scacap/action-surefire-report@v1
if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
with:
report_paths: '**/build/test-results/*/TEST-*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Sonar analysis
if: ${{ env.DEFAULT_JAVA == matrix.java && env.SONAR_TOKEN != null }}
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
security-events: write

steps:
- name: Checkout repository
Expand All @@ -29,7 +32,7 @@ jobs:
java-version: 17
cache: 'gradle'

- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/wrapper-validation@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down

0 comments on commit 5b971fd

Please sign in to comment.