Files
Davide Ferrari 4f5d868019 test: fix DashboardViewModelTest and add GHA workflow
- Add stopAutoRefresh() method to DashboardViewModel for testability
- Fix tests to use advanceTimeBy() + runCurrent() instead of
  advanceUntilIdle() to avoid infinite loop from auto-refresh job
- Add GitHub Actions workflow to run tests on PRs to main

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 15:48:59 +01:00

35 lines
688 B
YAML

name: Run Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run unit tests
run: ./gradlew testDebugUnitTest
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: app/build/reports/tests/testDebugUnitTest/