-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(github): Add a workflow to build and test the project
Signed-off-by: Sebastian Schuberth <[email protected]>
- Loading branch information
1 parent
bb6aa71
commit 9d09d21
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Build and Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotest.assertions.multi-line-diff=unified | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
- name: Build all classes | ||
run: ./gradlew classes | ||
codeql-analysis: | ||
needs: build | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
# Needed for SARIF scanning upload. | ||
security-events: write | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3 | ||
with: | ||
languages: java | ||
tools: linked | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
- name: Build all classes | ||
run: ./gradlew -Dorg.gradle.jvmargs=-Xmx1g classes | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3 | ||
test: | ||
needs: build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
- name: Run tests | ||
run: ./gradlew --scan test funTest | ||
- name: Create Test Summary | ||
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2 | ||
with: | ||
paths: "**/test-results/**/TEST-*.xml" | ||
if: always() |