-
-
Notifications
You must be signed in to change notification settings - Fork 12
118 lines (111 loc) · 3.3 KB
/
android-ci.yml
File metadata and controls
118 lines (111 loc) · 3.3 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Android CI
on:
push:
branches:
- develop
paths-ignore:
- ".github/actions/python/**"
- ".github/workflows/python-ci.yml"
- "app/src/main/**"
- "scripts/emoji_generator/**"
pull_request:
branches:
- develop
paths-ignore:
- ".github/actions/python/**"
- ".github/workflows/python-ci.yml"
- "app/src/main/**"
- "scripts/emoji_generator/**"
env:
CI: true
jobs:
wrapper-validation:
name: Wrapper Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: gradle/actions/wrapper-validation@v6
spotless:
name: Spotless Check
needs: wrapper-validation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Common setup
uses: ./.github/actions/android
- name: Run spotless check
run: ./gradlew spotlessCheck
gradle-dokka:
name: Generate and deploy docs
needs: wrapper-validation
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v6
- name: Common setup
uses: ./.github/actions/android
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate docs with dokka
run: ./gradlew dokkaHtmlMultiModule
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.8.0
with:
branch: docs # The branch the action should deploy to.
folder: dokka-docs # The folder the action should deploy.
token: ${{ steps.app-token.outputs.token }}
unit-test:
name: Unit Tests
needs: [wrapper-validation, spotless]
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v6
- name: Common setup
uses: ./.github/actions/android
- name: Run tests
run: |
./gradlew emojify:preTest
./gradlew emojify:test --stacktrace
./gradlew emojify:postTest
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: always()
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
token: ${{ steps.app-token.outputs.token }}
publish-artifact:
name: Publish Artifact
needs: unit-test
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Common setup
uses: ./.github/actions/android
- name: Run build
run: |
./gradlew emojify:preTest
./gradlew clean build --stacktrace
./gradlew emojify:postTest
- name: Publish to Local Maven
run: |
./gradlew publishMavenPublicationToMavenLocal
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: publications
path: ~/.m2/repository/io/wax911/emoji/