chore(deps): bump org.apache.maven.plugins:maven-gpg-plugin from 3.0.1 to 3.2.4 #199
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: Java CI with Maven | |
on: | |
push: | |
branches: | |
- feature** | |
- fix** | |
- master | |
paths-ignore: | |
- "**/README.md" | |
- "**/CONTRIBUTING.md" | |
- "**/CONTRIBUTORS.txt" | |
- "**/LICENSE" | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- "**/README.md" | |
- "**/CONTRIBUTING.md" | |
- "**/CONTRIBUTORS.txt" | |
- "**/LICENSE" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java-version: [8, 11, 17] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: "corretto" | |
cache: "maven" | |
- name: Cache Maven packages | |
uses: actions/[email protected] | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
- name: Compile with Maven | |
run: mvn -T 1C clean generate-sources compile --file pom.xml | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java-version: [8, 11, 17] | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: "corretto" | |
cache: "maven" | |
- name: Cache Maven packages | |
uses: actions/[email protected] | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
- name: Test with Maven | |
run: mvn -T 1C test-compile test --file pom.xml | |
sonarcloud: | |
environment: sonarcloud | |
runs-on: ubuntu-latest | |
needs: [build, test] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: "corretto" | |
cache: "maven" | |
- name: Cache SonarQube packages | |
uses: actions/[email protected] | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-sonar-${{ hashFiles('**/pom.xml') }} | |
- name: Cache Maven packages | |
uses: actions/[email protected] | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
- name: Build and analyze | |
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=amazon-sns-java-messaging-lib -Dsonar.organization=mvallim -Dsonar.host.url=https://sonarcloud.io -Dssonar.token=$SONAR_TOKEN | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |