Skip to content

Commit 3ca2f63

Browse files
authored
Merge pull request #81 from di-guimaraes/feature/enable-ci
[FEATURE] - Habilita CI
2 parents 55a4ca4 + 9ae5388 commit 3ca2f63

File tree

4 files changed

+70
-2
lines changed

4 files changed

+70
-2
lines changed

.github/workflows/android.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Android CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
ci:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: set up JDK 11
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: '11'
18+
distribution: 'temurin'
19+
cache: gradle
20+
- uses: ruby/setup-ruby@v1
21+
with:
22+
ruby-version: '3.2'
23+
bundler-cache: true
24+
- name: install fastlane
25+
run: bundle install
26+
- name: Grant execute permission for gradlew
27+
run: chmod +x gradlew
28+
- name: Run Lane from fastlane
29+
run: |
30+
ls
31+
pwd
32+
bundle exec fastlane ci
33+
34+
- name: Adding markdown
35+
if: failure()
36+
run: |
37+
echo '### Report' >> $GITHUB_STEP_SUMMARY
38+
echo ' Build falhando ' >> $GITHUB_STEP_SUMMARY
39+
echo ' > Execute `./gradlew build` local ' >> $GITHUB_STEP_SUMMARY

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "https://rubygems.org"
2+
3+
gem "fastlane"

fastlane/Fastfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
default_platform(:android)
3+
4+
platform :android do
5+
6+
desc "Run all CI lanes"
7+
lane :ci do
8+
test
9+
debug
10+
end
11+
12+
desc "Runs all the tests"
13+
lane :test do
14+
gradle(task: "test")
15+
end
16+
17+
desc "Create Release build"
18+
lane :release do
19+
gradle(task: "clean assembleRelease")
20+
end
21+
22+
desc "Deploy a new version to the Google Play"
23+
lane :debug do
24+
gradle(task: "clean assembleDebug")
25+
end
26+
end

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ksp = "1.8.10-1.0.9"
77
#Test
88
test_junit = "4.13.2"
99
androidx_core_testing = "2.2.0"
10-
mockk = "1.10.0"
10+
mockk = "1.13.8"
1111

1212
#Android Test
1313
androidx_test_core = "1.5.0"
@@ -139,4 +139,4 @@ android_library = { id = "com.android.library", version.ref = "android_gradle_pl
139139
kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
140140
kotlin_kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
141141
kotlin_parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
142-
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp"}
142+
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp"}

0 commit comments

Comments
 (0)