update
This commit is contained in:
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@@ -1,36 +1,22 @@
|
|||||||
name: Build
|
|
||||||
on:
|
on:
|
||||||
|
# Trigger analysis when pushing in master or pull requests, and when creating
|
||||||
|
# a pull request.
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- beanstalk-java8
|
- beanstalk-java8
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
name: Main Workflow
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
sonarcloud:
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||||||
- name: Set up JDK 8
|
fetch-depth: 0
|
||||||
uses: actions/setup-java@v1
|
- name: SonarCloud Scan
|
||||||
with:
|
uses: sonarsource/sonarcloud-github-action@master
|
||||||
java-version: 8
|
|
||||||
- name: Cache SonarCloud packages
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.sonar/cache
|
|
||||||
key: ${{ runner.os }}-sonar
|
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
|
||||||
- name: Cache Maven packages
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.m2
|
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
||||||
restore-keys: ${{ runner.os }}-m2
|
|
||||||
- name: Build and analyze
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
|
|
||||||
@@ -11,12 +11,6 @@
|
|||||||
|
|
||||||
<artifactId>ms-launcher</artifactId>
|
<artifactId>ms-launcher</artifactId>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<sonar.projectKey>sofieneBK_hands-on-hexagonal-architecture-with-spring-boot</sonar.projectKey>
|
|
||||||
<sonar.organization>sofienebk</sonar.organization>
|
|
||||||
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.example</groupId>
|
<groupId>org.example</groupId>
|
||||||
|
|||||||
6
sonar-project.properties
Normal file
6
sonar-project.properties
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
sonar.organization=sofienebk
|
||||||
|
sonar.projectKey=sofieneBK_hands-on-hexagonal-architecture-with-spring-boot
|
||||||
|
|
||||||
|
# relative paths to source directories. More details and properties are described
|
||||||
|
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
|
||||||
|
sonar.sources=.
|
||||||
Reference in New Issue
Block a user