Run tests in Cirrus CI again #718
Workflow file for this run
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
name: Build | |
on: [ push, pull_request ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
actions: read | |
checks: write | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: Android build cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.android/build-cache | |
key: ${{ runner.os }}-android | |
restore-keys: ${{ runner.os }}-android | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
cache: 'gradle' | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Build | |
env: | |
NEXTCLOUD_URL: ${{ vars.NEXTCLOUD_URL }} | |
NEXTCLOUD_USER: ${{ secrets.NEXTCLOUD_USER }} | |
NEXTCLOUD_PASS: ${{ secrets.NEXTCLOUD_PASS }} | |
run: ./gradlew compileDebugAndroidTestSources check assemble ktlintCheck | |
- name: Upload APKs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: seedvault-${{ github.sha }}-apks | |
path: | | |
app/build/outputs/apk/debug/app-debug.apk | |
contactsbackup/build/outputs/apk/debug/contactsbackup-debug.apk | |
storage/demo/build/outputs/apk/debug/demo-debug.apk | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
report_paths: '**/build/test-results/**/TEST-*.xml' | |