Repository navigation
64 lines (59 loc) · 1.95 KB
/
Copy pathci.yml
File metadata and controls
64 lines (59 loc) · 1.95 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
pull_request:
push:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c
- name: ktlint and Android Lint
run: ./gradlew ktlintCheck lintDebug lintRelease --continue
- name: Upload lint reports
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: lint-reports
path: |
build/reports/ktlint.xml
*/build/reports/lint-results-*.html
if-no-files-found: ignore
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad
with:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c
- name: Build, test and publish locally
run: ./gradlew assembleDebug assembleRelease testDebugUnitTest publishToMavenLocal
- name: Public API check
run: ./gradlew apiCheck
- name: Minified sample build (R8 with the consumer rules)
run: ./gradlew :sample:assembleQa
- name: Upload test reports
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
name: test-reports
path: '*/build/reports/tests/'
if-no-files-found: ignore