mirror of
https://github.com/gbevin/urlencoder.git
synced 2025-04-24 23:07:12 -07:00
Updated workflow to latest actions
This commit is contained in:
parent
cdad2dd145
commit
4afb8ab50f
1 changed files with 10 additions and 23 deletions
33
.github/workflows/gradle.yml
vendored
33
.github/workflows/gradle.yml
vendored
|
@ -1,6 +1,6 @@
|
||||||
name: gradle-ci
|
name: gradle-ci
|
||||||
|
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on: [ push, pull_request, workflow_dispatch ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-gradle-project:
|
build-gradle-project:
|
||||||
|
@ -11,17 +11,17 @@ jobs:
|
||||||
SONAR_JDK: "11"
|
SONAR_JDK: "11"
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java-version: [ 11, 17, 19 ]
|
java-version: [ 11, 17, 19 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java-version }}
|
- name: Set up JDK ${{ matrix.java-version }}
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
|
@ -31,24 +31,16 @@ jobs:
|
||||||
|
|
||||||
- name: Cache SonarCloud packages
|
- name: Cache SonarCloud packages
|
||||||
if: matrix.java-version == env.SONAR_JDK
|
if: matrix.java-version == env.SONAR_JDK
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.sonar/cache
|
path: ~/.sonar/cache
|
||||||
key: ${{ runner.os }}-sonar
|
key: ${{ runner.os }}-sonar
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
restore-keys: ${{ runner.os }}-sonar
|
||||||
|
w
|
||||||
- name: Cache Gradle packages
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: ${{ runner.os }}-gradle-${{ matrix.java-version }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-gradle-${{ matrix.java-version }}-
|
|
||||||
|
|
||||||
- name: Test with Gradle
|
- name: Test with Gradle
|
||||||
run: ./gradlew build check --stacktrace -PtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: build check --stacktrace -PtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
|
||||||
|
|
||||||
- name: SonarCloud
|
- name: SonarCloud
|
||||||
if: success() && matrix.java-version == env.SONAR_JDK
|
if: success() && matrix.java-version == env.SONAR_JDK
|
||||||
|
@ -56,8 +48,3 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
run: ./gradlew jacocoTestReport sonar --info
|
run: ./gradlew jacocoTestReport sonar --info
|
||||||
|
|
||||||
- name: Cleanup Gradle Cache
|
|
||||||
run: |
|
|
||||||
rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
|
||||||
rm -f ~/.gradle/caches/modules-2/gc.properties
|
|
Loading…
Add table
Add a link
Reference in a new issue