Skip to content

Commit

Permalink
Added build workflow and sonar analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
stefankoppier committed Jun 16, 2024
1 parent e5118c1 commit b44facb
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

permissions:
pull-requests: read
jobs:
build:
name: Build and Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin

- name: Build
run: ./gradlew build

- name: Sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar
2 changes: 2 additions & 0 deletions .github/workflows/website_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
Expand Down
12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
plugins {
alias(libs.plugins.sonarqube)
}

allprojects {
group = "io.github.mappie"
version = "0.1.0"
}

sonar {
properties {
property("sonar.projectKey", "Mr-Mappie_mappe")
property("sonar.organization", "mappie")
property("sonar.host.url", "https://sonarcloud.io")
}
}
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", vers

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
gradle-plugin-publish = { id = "com.gradle.plugin-publish", version = "1.2.1" }
gradle-plugin-publish = { id = "com.gradle.plugin-publish", version = "1.2.1" }
sonarqube = { id = "org.sonarqube", version = "4.4.1.3373" }

0 comments on commit b44facb

Please sign in to comment.