mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 22:29:09 +00:00
40 lines
1.3 KiB
YAML
40 lines
1.3 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:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: 17
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
|
|
- name: Run unit tests with coverage
|
|
run: ./gradlew testGplayDebugUnit
|
|
- name: Upload test artifacts
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
|
|
with:
|
|
name: test-results
|
|
path: app/build/reports/tests/testGplayDebugUnitTest/
|