Translations update from Hosted Weblate (#107) #178
This file contains hidden or 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@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | |
| with: | |
| path: app/build | |
| key: ${{ runner.os }}-build-${{ hashFiles('app/build.gradle') }} | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16 | |
| 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/Notes/b9ae226569379574723b9367d33d45bc868e110e#server nixpkgs/master#imagemagick | |
| - name: Run Trilium Server | |
| run: ./app/test/setup-test-server.sh | |
| - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 | |
| 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 |