mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-18 19:19:33 +01:00
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
name: Unit tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ master, main, stable-* ]
|
|
push:
|
|
branches: [ master, main, stable-* ]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: unit-tests-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: 17
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
|
|
|
- name: Run unit tests with coverage
|
|
run: ./gradlew testGplayDebugUnit
|
|
|
|
- name: Upload test artifacts
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: test-results
|
|
path: app/build/reports/tests/testGplayDebugUnitTest/
|