Skip to content

Bump actions/cache from 4.2.4 to 4.3.0 #191

Bump actions/cache from 4.2.4 to 4.3.0

Bump actions/cache from 4.2.4 to 4.3.0 #191

Workflow file for this run

name: Test
on:
push:
branches:
- '*'
pull_request:
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: app/build
key: ${{ runner.os }}-build-${{ hashFiles('app/build.gradle') }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: DeterminateSystems/nix-installer-action@786fff0690178f1234e4e1fe9b536e94f5433196 # v20
with:
extra-conf: "extra-substituters = https://cache.garnix.io\nextra-trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
- name: Install Trilium Server and ImageMagick
run: nix profile install github:TriliumNext/Trilium/27e6d1b00b53bcf1b9558fdc92da610460659dc6#server nixpkgs/master#imagemagick # v0.99.0
- name: Run Trilium Server
run: ./app/test/setup-test-server.sh
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Configure test networking
run: "sed -i 's/LOCAL_TEST = true/LOCAL_TEST = false/g' app/src/androidTest/kotlin/eu/fliegendewurst/triliumdroid/InitialSyncTest.kt"
- name: Configure Gradle wrapper
run: gradle wrapper --no-daemon
- name: Run unit tests
run: ./gradlew :app:testDebugUnitTest
- name: Run emulator tests
run: ./gradlew :app:pixel9api35DebugAndroidTest
- name: Upload screenshots
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: screenshots
path: app/build/outputs/managed_device_android_test_additional_output/debug/pixel9api35/*
- name: Compare screenshots to reference
run: ./app/test/compare-test-images.sh
- name: Delete screenshots before caching
run: rm app/build/outputs/managed_device_android_test_additional_output/debug/pixel9api35/* 2>/dev/null || true