Skip to content

Update labeler.yml #870

Update labeler.yml

Update labeler.yml #870

Workflow file for this run

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 }}