Repository navigation
50 lines (41 loc) · 1.5 KB
/
Copy pathci.yml
File metadata and controls
50 lines (41 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: 17
# Also checks that gradle-wrapper.jar is an official Gradle release.
- uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1.6.4.1.6.4.1
# lintRelease catches checks that only fail in a release build; it needs no signing key.
- name: Unit tests, lint and debug build
run: ./gradlew testDebugUnitTest lintDebug lintRelease assembleDebug --console=plain
- name: Upload unit test report
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: unit-test-report
path: app/build/reports/tests/testDebugUnitTest/
if-no-files-found: ignore
- name: Upload lint report
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: lint-report
path: |
app/build/reports/lint-results-debug.html
app/build/reports/lint-results-release.html
if-no-files-found: ignore