-
Notifications
You must be signed in to change notification settings - Fork 686
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
DEVOPS-837: Jenkins 2 Actions #5021
Open
sebastiangollob
wants to merge
37
commits into
develop
Choose a base branch
from
DEVOPS-837
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
8464535
Update build
sebastiangollob 2970ebe
test
sebastiangollob d08caaf
Update build.yml
sebastiangollob 662daa8
Refactor emulator options in build.yml
sebastiangollob 2f30973
Refactor emulator options and update build.yml
sebastiangollob 5b24755
test
sebastiangollob c05248e
test
sebastiangollob 49e4648
try
sebastiangollob f4877ed
Merge branch 'develop' into DEVOPS-837
sebastiangollob 2ee32f0
test api 34
sebastiangollob c1c0ecd
Update to JDK 21
sebastiangollob 16d18a1
Refactor GitHub Actions workflow
sebastiangollob 65a56e7
Update dependencies
sebastiangollob 9cf66df
Fix errors
sebastiangollob 8582d48
Test
sebastiangollob aa958a7
Test Win
sebastiangollob b8dcb8c
Update build.yml
sebastiangollob 8fe0df5
Update build.yml
sebastiangollob ce0e0f0
Update pipeline
sebastiangollob 233ca70
Merge branches 'DEVOPS-837' and 'DEVOPS-837' of github.com:Catrobat/C…
sebastiangollob 67914d9
Fix syntax error in build.yml for unit test command
sebastiangollob 99a0d27
Test
sebastiangollob 4d6e484
Refactor build.yml to enhance Gradle setup and improve static analysi…
sebastiangollob f86a316
Update build.yml and code_quality_tasks.gradle for improved static an…
sebastiangollob 6014ef9
Update build.yml and code_quality_tasks.gradle to change report forma…
sebastiangollob d7f84ff
Enhance build.yml and code_quality_tasks.gradle to upload additional …
sebastiangollob 204d00f
Test Fix 1
sebastiangollob a1d99c9
test codeql
sebastiangollob b8972ef
Add permissions for security events and package access in build.yml
sebastiangollob 898b974
Change CodeQL build mode to manual and add Dev Build step in build.yml
sebastiangollob ef2cd9b
SARIF hack
sebastiangollob 269c935
Refactor checkStyleSarifHack task to simplify URI updates in SARIF file
sebastiangollob 30f6e5f
Update pipeline to use matrix
sebastiangollob 644b560
Fix
sebastiangollob 24a4705
Fixup
sebastiangollob 21ebef5
Update Unit Tests
sebastiangollob 455ca92
Add Unit Reports
sebastiangollob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,143 @@ | ||
name: Catroid Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
branches: | ||
- "**" | ||
# schedule: | ||
# - cron: "0 0 * * *" # Run daily at midnight | ||
workflow_dispatch: | ||
inputs: | ||
WEB_TEST_URL: | ||
description: "When set, all the archived APKs will point to this Catrobat web server, useful for testing web changes. E.g https://web-test.catrob.at" | ||
required: false | ||
type: string | ||
default: "" | ||
BUILD_ALL_FLAVOURS: | ||
description: "When selected all flavours are built and archived as artifacts that can be installed alongside other versions of the same APKs" | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build: | ||
name: Build APK | ||
runs-on: ubuntu-latest | ||
env: | ||
WEB_TEST_URL: ${{ inputs.WEB_TEST_URL != '' && format('-PwebTestUrl=''{0}''', inputs.WEB_TEST_URL) || '' }} | ||
ALL_FLAVOURS_PARAMETERS: ${{ inputs.BUILD_ALL_FLAVOURS && 'assembleCreateAtSchoolDebug assembleLunaAndCatDebug assemblePhiroDebug assembleEmbroideryDesignerDebug assemblePocketCodeBetaDebug assembleMindstormsDebug' || '' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 21 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Build APK | ||
run: ./gradlew ${{ env.WEB_TEST_URL }} -Pindependent='#${{ github.run_number }} ${{ github.ref_name }}' assembleCatroidDebug ${{ env.ALL_FLAVOURS_PARAMETERS }} | ||
# TODO: Check where to upload the APKs as GitHub Storage is an issue | ||
# | ||
# - name: Rename APKs | ||
# run: | | ||
# for file in $(find . -name "*.apk"); do | ||
# mv "$file" "$(dirname "$file")/${{ github.ref_name }}-${{ github.run_number }}-$(basename "$file")" | ||
# done | ||
# | ||
# - name: Archive APKs | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: apk-artifacts | ||
# path: "**/*.apk" | ||
|
||
unit-tests: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
env: | ||
WEB_TEST_URL: ${{ inputs.WEB_TEST_URL != '' && format('-PwebTestUrl=''{0}''', inputs.WEB_TEST_URL) || '' }} | ||
ALL_FLAVOURS_PARAMETERS: ${{ inputs.BUILD_ALL_FLAVOURS && 'assembleCreateAtSchoolDebug assembleLunaAndCatDebug assemblePhiroDebug assembleEmbroideryDesignerDebug assemblePocketCodeBetaDebug assembleMindstormsDebug' || '' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 21 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Run Unit Tests | ||
run: ./gradlew -PenableCoverage jacocoTestCatroidDebugUnitTestReport --full-stacktrace | ||
|
||
- name: Test Report | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() | ||
with: | ||
name: Unit Tests | ||
path: catroid/build/test-results/testCatroidDebugUnitTest/*.xml | ||
reporter: java-junit | ||
|
||
- name: Upload Unit Test Reports | ||
uses: actions/upload-artifact@v4 | ||
if: success() || failure() | ||
with: | ||
name: unit-test-report | ||
path: | | ||
catroid/build/reports/tests/testCatroidDebugUnitTest | ||
|
||
code-analysis: | ||
name: Code Analysis | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tool: | ||
- { name: "pmd", sarif: false } | ||
- { name: "checkstyle", sarif: true } | ||
- { name: "detekt", sarif: true } | ||
- { name: "lint", sarif: true } | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 21 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Run ${{ matrix.tool.name }} Analysis | ||
run: | | ||
case ${{ matrix.tool.name }} in | ||
"pmd") ./gradlew pmd ;; | ||
"checkstyle") ./gradlew checkstyle ;; | ||
"detekt") ./gradlew detekt ;; | ||
"lint") ./gradlew lintCatroidDebug ;; | ||
esac | ||
|
||
- name: Upload ${{ matrix.tool.name }} SARIF Report | ||
uses: github/codeql-action/upload-sarif@v3 | ||
if: ${{ matrix.tool.sarif && (success() || failure()) }} | ||
with: | ||
sarif_file: catroid/build/reports/${{ matrix.tool.name }}.sarif | ||
category: ${{ matrix.tool.name }} | ||
|
||
- name: Upload ${{ matrix.tool.name }} HTML Report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.tool.name }}-report | ||
path: | | ||
catroid/build/reports/html/${{ matrix.tool.name }}.html |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / Checkstyle
Line does not match expected header line of '^\W*$'. Warning