Add GitHub Actions CI for pull requests#4
Conversation
Agent-Logs-Url: https://github.com/benju69/Tasks/sessions/f3859361-62ce-4f04-98c7-46488d96c55d Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to run CI on pull requests, validating unit tests and producing a debug APK artifact for manual/device testing.
Changes:
- Introduces a PR-triggered CI workflow.
- Runs
./gradlew testand./gradlew assembleDebugonubuntu-latest. - Uploads the generated debug APK as a downloadable Actions artifact.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pull_request: | ||
|
|
||
| jobs: | ||
| build: |
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'temurin' |
There was a problem hiding this comment.
Done in 9d26a50. Added cache: gradle to actions/setup-java to cache the Gradle dependency graph between runs. Also took the opportunity to add permissions: contents: read (least-privilege) and if-no-files-found: error + retention-days: 7 on the APK upload step.
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: app-debug | ||
| path: app/build/outputs/apk/debug/app-debug.apk |
|
@copilot add the artifact download url in comment in the pr |
…guard Agent-Logs-Url: https://github.com/benju69/Tasks/sessions/835c6fbc-03d1-4962-a7fa-7344503095f7 Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
Agent-Logs-Url: https://github.com/benju69/Tasks/sessions/e5e8b999-4d85-4c1f-b176-50d79fea907d Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com>
Done in bef8e0d. After the APK is uploaded, |
📦 Debug APK ready |
Adds a CI pipeline that runs on every pull request to validate tests, build the app, and expose the APK for device testing.
Workflow (
ci.yml)contents: readandpull-requests: write./gradlew testacross all modules (JUnit Jupiter)./gradlew assembleDebug— debug variant avoids the uncommitted keystore requirementactions/setup-java(cache: gradle) to speed up runs and reduce flakiness from transient download failuresapp/build/outputs/apk/debug/app-debug.apkviaactions/upload-artifact@v4withif-no-files-found: errorand 7-day retention; fails loudly if the APK is missingactions/github-script@v7