mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
da98a8a980
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 3.1.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...3cea5372237819ed00197afe530f5a7ea3e805c8) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
45 lines
1.7 KiB
YAML
45 lines
1.7 KiB
YAML
name: Unit tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ master, stable-* ]
|
|
push:
|
|
branches: [ master, stable-* ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up JDK 11
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: 11
|
|
- name: Delete old comments
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
if: ${{ always() }}
|
|
run: scripts/deleteOldComments.sh "test" "Unit" ${{github.event.number}}
|
|
- name: Run unit tests with coverage
|
|
uses: gradle/gradle-build-action@v2
|
|
with:
|
|
arguments: jacocoTestGplayDebugUnitTest
|
|
- name: Upload failing results
|
|
if: ${{ failure() }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run:
|
|
scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} "test" "Unit" ${{github.event.number}}
|
|
- name: Upload coverage to codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
flags: unit
|
|
fail_ci_if_error: true
|
|
- name: Upload jacoco artifacts
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
|
|
with:
|
|
name: test-results
|
|
path: app/build/reports/tests/testGplayDebugUnitTest/
|