chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.2 #927
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: build | |
on: | |
push: | |
paths-ignore: | |
- "docs/**" | |
branches: | |
- master | |
- release/* | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
mongodb: | |
image: mongo | |
ports: | |
- 27017:27017 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
# use `services` instead. | |
# - name: Set up MongoDb | |
# run: | | |
# docker-compose up -d mongodb | |
# docker ps -a | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build with Maven | |
run: mvn -B -q clean package -DskipTests | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Build and analyze | |
# run test and generate jacoco:report | |
run: | | |
mvn -B -q clean verify -Pcoverage \ | |
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ | |
-Dsonar.host.url=https://sonarcloud.io \ | |
-Dsonar.login=$SONAR_TOKEN \ | |
-Dsonar.organization=hantsy \ | |
-Dsonar.projectKey=hantsy_spring-reactive-jwt-sample \ | |
-Dsonar.coverage.exclusions=**/domain/*,**/*Config.java,**/*Form.java,**/*Value.java,**/*Request.java,**/Application.*,**/*Initializer.* | |
env: | |
# Needed to get some information about the pull request, if any | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/ | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
# - name: upload Coday code coverage reports | |
# run: | | |
# bash <(curl -Ls https://coverage.codacy.com/get.sh) | |
# env: | |
# CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN}} | |
# coveralls coverage is moved to maven plugin and configured with semaphore ci | |
# - name: Coveralls | |
# uses: coverallsapp/github-action@master | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} |