Skip to content

Bump actions/cache from 5.0.1 to 5.0.3 #221

Bump actions/cache from 5.0.1 to 5.0.3

Bump actions/cache from 5.0.1 to 5.0.3 #221

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@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: app/build
key: ${{ runner.os }}-build-${{ hashFiles('app/build.gradle') }}
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: DeterminateSystems/nix-installer-action@c5a866b6ab867e88becbed4467b93592bce69f8a # v21
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/v0.101.3#server nixpkgs/master#imagemagick
- name: Run Trilium Server
run: ./app/test/setup-test-server.sh
- uses: actions/setup-java@5d7b2146334bacf88728daaa70414a99f5164e0f # 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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
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