Skip to content

Commit c56b267

Browse files
authored
Merge pull request #6 from lopspower/feat_github_actions
[FEAT] Improve GitHub features: PR & issue template, Actions CI
2 parents 0f85b13 + 37fe599 commit c56b267

File tree

5 files changed

+146
-0
lines changed

5 files changed

+146
-0
lines changed

.github/CODEOWNERS

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Lines starting with '#' are comments.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# More details are here: https://help.github.com/articles/about-codeowners/
5+
6+
# The '*' pattern is global owners.
7+
# Not adding in this PR, but I'd like to try adding a global owner set with the entire team.
8+
# One interpretation of their docs is that global owners are added only if not removed
9+
# by a more local rule.
10+
11+
# Order is important. The last matching pattern has the most precedence.
12+
# The folders are ordered as follows:
13+
14+
# In each subsection folders are ordered first by depth, then alphabetically.
15+
# This should make it easy to add new rules without breaking existing ones.
16+
* @lopspower
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Bug report
3+
about: Something is crashing or not working as intended
4+
5+
---
6+
7+
**Please complete the following information:**
8+
- Library Version [e.g. v1.0.0]
9+
- Affected Device(s) [e.g. Samsung Galaxy s10 with Android 9.0]
10+
11+
**Describe the Bug:**
12+
13+
Add a clear description about the problem.
14+
15+
**Expected Behavior:**
16+
17+
A clear description of what you expected to happen.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem?**
8+
9+
A clear and concise description of what the problem is.
10+
11+
**Describe the solution you'd like:**
12+
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered:**
16+
17+
A clear description of any alternative solutions you've considered.

.github/pull_request_template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Guidelines
2+
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
3+
4+
### Types of changes
5+
What types of changes does your code introduce?
6+
7+
- [ ] Bugfix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

.github/workflows/main_pr_ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Android Master CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
unit-tests:
10+
name: Run Unit Tests
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v2
19+
with:
20+
distribution: 'adopt'
21+
java-version: '11'
22+
23+
- name: Run Presentation Unit Tests
24+
run: ./gradlew :presentation:testDebugUnitTest
25+
26+
- name: Run Data Unit Tests
27+
run: ./gradlew :data:testDebugUnitTest
28+
29+
- name: Run Domain Unit Tests
30+
run: ./gradlew :domain:test
31+
32+
instrumented-tests:
33+
name: Run Android Tests
34+
runs-on: macos-latest
35+
timeout-minutes: 20
36+
strategy:
37+
matrix:
38+
api-level: [ 29 ] #[21, 23, 29]
39+
target: [ default ] #[default, google_apis]
40+
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v2
44+
45+
- name: Set up JDK 11
46+
uses: actions/setup-java@v2
47+
with:
48+
distribution: 'adopt'
49+
java-version: '11'
50+
51+
- name: Run All Android Tests
52+
uses: reactivecircus/android-emulator-runner@v2.19.1
53+
#continue-on-error: true
54+
with:
55+
api-level: ${{ matrix.api-level }}
56+
target: ${{ matrix.target }}
57+
arch: x86_64
58+
script: ./gradlew connectedCheck
59+
60+
- name: Upload emulator tests artifact
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: emulator_tests
64+
path: ./presentation/build/reports/androidTests/connected
65+
66+
apk:
67+
name: Generate Debug APK
68+
runs-on: ubuntu-18.04
69+
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v2
73+
74+
- name: Set up JDK 11
75+
uses: actions/setup-java@v2
76+
with:
77+
distribution: 'adopt'
78+
java-version: '11'
79+
80+
- name: Build Debug APK
81+
run: bash ./gradlew :presentation:assembleDebug --stacktrace
82+
83+
- name: Upload Debug APK
84+
uses: actions/upload-artifact@v2
85+
with:
86+
name: apk
87+
path: presentation/build/outputs/apk/debug/presentation-debug.apk

0 commit comments

Comments
 (0)