Skip to content
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
18 changes: 15 additions & 3 deletions .github/workflows/emulated_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
emulated-tests:
name: Emulated Tests
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
checks: write
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -94,19 +99,26 @@ jobs:
./gradlew compileCatroidDebugSources compileCatroidDebugAndroidTestSources

# 2. Standard Test-Run without Coverage
./gradlew disableAnimations -PenableCoverage createCatroidDebugAndroidTestCoverageReport -Pandroid.testInstrumentationRunnerArguments.class=${{inputs.gradle-test-config}}
./gradlew disableAnimations -PenableCoverage createCatroidDebugAndroidTestCoverageReport -Pandroid.testInstrumentationRunnerArguments.class=${{ inputs.gradle-test-config }}
# | grep "There were failing tests."

- name: Upload Test Reports XML
uses: actions/upload-artifact@v4
if: always() # IMPORTANT: Upload reports regardless of status
with:
name: ${{ inputs.calling-job }}-test-report-xml
path: catroid/**/androidTest-results/**/TEST-*.xml

- name: Upload Test Reports Folder
uses: actions/upload-artifact@v4
if: always() # IMPORTANT: Upload reports regardless of status
with:
name: test-reports-${{inputs.calling-job}}
name: ${{ inputs.calling-job }}-test-report
path: catroid/build/reports/androidTests/connected/debug/flavors/catroid

- name: Upload Coverage Report
uses: actions/upload-artifact@v4
if: always() # IMPORTANT: Upload reports regardless of status
with:
name: coverage-report-${{inputs.calling-job}}
name: ${{ inputs.calling-job }}-coverage-report
path: catroid/build/reports/coverage/androidTest/catroid/debug/connected
10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
steps:
- run: echo "This workflow was triggered in the ${{ github.repository }} repo!"


build:
needs: repo-check
name: Build APK
Expand Down Expand Up @@ -69,6 +68,11 @@ jobs:
needs: repo-check
name: Unit Tests
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
repository-projects: write
checks: write
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' || '' }}
Expand All @@ -89,8 +93,8 @@ jobs:
- name: Run Unit Tests
run: ./gradlew -PenableCoverage jacocoTestCatroidDebugUnitTestReport --full-stacktrace

- name: Test Report
uses: dorny/test-reporter@v1
- name: Upload Unit Test Reports XML
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Unit Tests
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Test Report'

on:
workflow_run:
workflows:
- Catroid Main Workflow
- Catroid UI Test Workflow
types:
- completed

concurrency:
group: reporter-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: false

permissions:
contents: read
actions: read
checks: write
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v2
with:
artifact: /(.*)-test-results-xml/ # artifact name
name: JUnit $1 Tests # Name of the check run which will be created
path: '**/TEST-*.xml' # Path to test results (inside artifact .zip)
reporter: java-junit # Format of test results
Loading