Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use qualityannotate in this repo #3

Merged
merged 6 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on: # yamllint disable-line rule:truthy

jobs:
build:
name: "build"
permissions:
checks: write
runs-on: ubuntu-latest
Expand All @@ -51,5 +52,53 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonar --no-daemon
build-native:
name: "build-native"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Build native
run: ./gradlew build --no-daemon -Dquarkus.package.type=native
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: qualityannotate
retention-days: 1
path: ./build/qualityannotate-1.0.0-SNAPSHOT-runner
if-no-files-found: error
qualityannotate:
needs: build-native
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download qualityannotate
uses: actions/download-artifact@v3
with:
name: qualityannotate
- uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: open
- name: Qualityannotate
if: success() && steps.findPr.outputs.number
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
GITHUB_PULL_REQUEST: ${{ steps.findPr.outputs.pr }}
GITHUB_PROJECT: balrok/qualityannotate # ${{env.GITHUB_ACTION_REPOSITORY}}
SONARQUBE_PROJECT: quyt_qualityannotate
SONARQUBE_URL: https://sonarcloud.io/
SONARQUBE_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONARQUBE_PULL_REQUEST: ${{ steps.findPr.outputs.pr }}
run: |
chmod +x ./qualityannotate-1.0.0-SNAPSHOT-runner
mkdir -p config
cp src/main/resources/application.yml config/
./qualityannotate-1.0.0-SNAPSHOT-runner
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies {
testImplementation 'io.quarkus:quarkus-junit5'
testImplementation "org.wiremock:wiremock:3.2.0"
testImplementation "org.mockito:mockito-core:3.9.0"
testImplementation "io.quarkus:quarkus-jacoco"
}

group 'org.qualityannotate'
Expand Down Expand Up @@ -54,6 +55,7 @@ sonar {

property "sonar.projectName", "Quality Annotate"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.jacoco.reportPath", "build/jacoco-quarkus.exec"
}
}

Expand All @@ -63,7 +65,14 @@ jacocoTestReport {
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
}
test.finalizedBy jacocoTestReport
test {
finalizedBy jacocoTestReport
jacoco {
excludeClassLoaders = ["*QuarkusClassLoader"]
destinationFile = layout.buildDirectory.file("jacoco-quarkus.exec").get().asFile
}
jacocoTestReport.enabled = false
}

spotless {
encoding 'UTF-8'
Expand Down
10 changes: 0 additions & 10 deletions sonar-project.properties

This file was deleted.

Loading