Skip to content

Commit

Permalink
Github workflows sonar cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Mar 6, 2021
1 parent 73111b6 commit d600977
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 22 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,37 @@
name: Build
on:
push:
branches:
- develop
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- 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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions pom.xml
Expand Up @@ -56,6 +56,10 @@
<!-- This allows to change between versions and snapshots. -->
<build.version>1.14.1</build.version>
<build.number>-LOCAL</build.number>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_Biomes</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

<profiles>
Expand Down

0 comments on commit d600977

Please sign in to comment.