Auto-revision notes in interval #69
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: Test | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/cache@v4 | |
id: cache-build | |
with: | |
path: app/build | |
key: ${{ runner.os }}-build | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v16 | |
- name: Install Trilium Server and ImageMagick | |
run: nix profile install nixpkgs/nixos-unstable-small#trilium-next-server nixpkgs/nixos-unstable-small#imagemagick | |
- name: Run Trilium Server | |
run: ./app/test/setup-test-server.sh | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Build tests | |
run: gradle :app:packageDebugAndroidTest | |
- name: Run tests on emulator | |
run: gradle :app:pixel9api35DebugAndroidTest | |
- name: Upload screenshots | |
if: always() | |
uses: actions/upload-artifact@v4 | |
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 |