feat: set up sonarcloud (#10)

* chore: set up sonarcloud
* chore: copied tests for issue #7 to jodatime version
* chore: moved to maven ci-friendly versions
This commit is contained in:
Frode Carlsen
2020-11-05 07:09:32 +01:00
committed by GitHub
parent c921808fa0
commit 3ca9661833
4 changed files with 31 additions and 15 deletions

View File

@@ -1,6 +1,11 @@
name: Java CI name: Java CI
on: [push] on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs: jobs:
build: build:
@@ -8,10 +13,17 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v2
- name: Set up JDK 11 with:
uses: actions/setup-java@v1 fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
with: - name: Set up JDK
version: 11 uses: actions/setup-java@v1
- name: Build with Maven with:
run: mvn package --file pom.xml java-version: 11
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --file pom.xml -DtrimStackTrace=false -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=fco -Dsonar.projectKey=frode-carlsen_cron

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>fc.cron</groupId> <groupId>fc.cron</groupId>
<artifactId>cron</artifactId> <artifactId>cron</artifactId>
<version>1.5</version> <version>${revision}${sha1}${changelist}</version>
</parent> </parent>
<artifactId>cron-java8</artifactId> <artifactId>cron-java8</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>fc.cron</groupId> <groupId>fc.cron</groupId>
<artifactId>cron</artifactId> <artifactId>cron</artifactId>
<version>1.5</version> <version>${revision}${sha1}${changelist}</version>
</parent> </parent>
<artifactId>cron-jodatime</artifactId> <artifactId>cron-jodatime</artifactId>

14
pom.xml
View File

@@ -5,10 +5,18 @@
<groupId>fc.cron</groupId> <groupId>fc.cron</groupId>
<artifactId>cron</artifactId> <artifactId>cron</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.6-SNAPSHOT</version> <version>${revision}${sha1}${changelist}</version>
<name>cron</name> <name>cron</name>
<url>https://github.com/frode-carlsen/cron</url> <url>https://github.com/frode-carlsen/cron</url>
<properties>
<revision>1.6</revision>
<sha1 />
<changelist>-SNAPSHOT</changelist>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<licenses> <licenses>
<license> <license>
<name>Apache License Version 2.0</name> <name>Apache License Version 2.0</name>
@@ -78,8 +86,4 @@
</profile> </profile>
</profiles> </profiles>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
</project> </project>