-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (78 loc) · 2.46 KB
/
android.yml
File metadata and controls
85 lines (78 loc) · 2.46 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
name: TMDB CI
on:
push:
branches: [ master, feature/github_actions ]
pull_request:
branches: [ master, feature/github_actions ]
jobs:
test:
name: Run Unit Tests
runs-on: ubuntu-latest #Each job runs in a runner environment specified
steps:
- uses: actions/checkout@v2.3.3
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Unit tests
run: bash ./gradlew test --stacktrace
- name: Unit tests results
uses: actions/upload-artifact@v2.2.3
with:
name: unit-tests-results
path: app/build/reports/tests/testDebugUnitTest/index.html
lint:
name: Lint Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Lint debug flavor
run: bash ./gradlew lintDebug --stacktrace
- name: Lint results
uses: actions/upload-artifact@v2.2.3
with:
name: lint-result
path: app/build/reports/lint-results-debug.html
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Build with Gradle
run: bash ./gradlew assembleDebug --stacktrace
- name: Upload APK
uses: actions/upload-artifact@v2.2.3
with:
name: app
path: app/build/outputs/apk/debug/*.apk
- name: Send mail
if: always()
uses: dawidd6/action-send-mail@v2
with:
# mail server settings
server_address: smtp.gmail.com
server_port: 465
# user credentials
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
# email subject
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
# email body as text
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}
# comma-separated string, send email to
to: francisco.beccut@intive.com
# from email name
from: TMDB Team! GitHub Actions!