Ci/setup fastlane
Closes #506
Sets up fastlane for the CI.
- [ ] Setup fastlane on Android.
- [ ] Setup fastlane on iOS.
- [ ] Setup CI to use fastlane.
- [ ] Add build instructions.
Review checklist
- [ ] Terms and conditions reflect the current change
- [ ] Contains enough appropriate tests
- [ ] If aimed at production, writes a new summary in
whatsnew/whatsnew-pt-PT - [ ] Properly adds an entry in
changelog.mdwith the change - [ ] If PR includes UI updates/additions, its description has screenshots
- [ ] Behavior is as expected
- [ ] Clean, well-structured code
----------------------
--- fastlane lanes ---
----------------------
fastlane uses a `Fastfile` to store the automation configuration
Within that, you'll see different lanes.
Each is there to automate a different task, like screenshots, code signing, or pushing new releases
Continue by pressing Enter ⏎
--------------------------------------
--- How to customize your Fastfile ---
--------------------------------------
Use a text editor of your choice to open the newly created Fastfile and take a look
You can now edit the available lanes and actions to customize the setup to fit your needs
To get a list of all the available actions, open https://docs.fastlane.tools/actions
Continue by pressing Enter ⏎
------------------------------
--- Where to go from here? ---
------------------------------
📸 Learn more about how to automatically generate localized Google Play screenshots:
https://docs.fastlane.tools/getting-started/android/screenshots/
👩✈️ Learn more about distribution to beta testing services:
https://docs.fastlane.tools/getting-started/android/beta-deployment/
🚀 Learn more about how to automate the Google Play release process:
https://docs.fastlane.tools/getting-started/android/release-deployment/
To try your new fastlane setup, just enter and run
$ fastlane test
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 17%. Comparing base (
5fe81b3) to head (2c6d504). Report is 1633 commits behind head on develop.
:x: Your project check has failed because the head coverage (17%) is below the target coverage (70%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files
@@ Coverage Diff @@
## develop #1219 +/- ##
=======================================
Coverage 17% 17%
=======================================
Files 229 229
Lines 6986 6986
=======================================
Hits 1149 1149
Misses 5837 5837
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@limwa does fastlane support changing store descriptions, e.g. screenshots? That's awesome.
@limwa does fastlane support changing store descriptions, e.g. screenshots? That's awesome.
Yes, it does! Updating descriptons and screenshots should be done through fastlane once this PR is merged!
I'd consider setting up Fastlane once, instead of twice (for Android and iOS).
In my previous projects (at companies & personal ones), Fastlane was always being set up twice, but I'm wondering if if we do it once, it'll be better.
The main con of the current approach is that when updating Fastlane, everything has to be done twice (for no good reason). And then there's also duplication.
In other words, I suggest:
├── lib/
├── android/
├── ios/
├── fastlane/
│ ├── Gemfile
│ ├── Gemfile.lock
│ └── fastlane/
│ ├── Appfile
│ ├── Fastfile
│ ├── Matchfile
│ ├── Pluginfile
instead of:
├── lib/
├── android/
│ ├── Gemfile
│ ├── Gemfile.lock
│ └── fastlane/
│ ├── Appfile
│ ├── Fastfile
│ ├── Matchfile
├── ios/
│ ├── Gemfile
│ ├── Gemfile.lock
│ └── fastlane/
│ ├── Appfile
│ ├── Fastfile
│ ├── Matchfile
Fastlane is very much configurable, so I'm pretty sure we can make this setup work. Rn I'm in the process of trying it out in a personal project of mine (https://github.com/bartekpacia/opencaching), when I finish I can get back to you with the results.
@bartekpacia the reason it is done this way is because it is the recommended way in the documentation I'm not sure about using only a single fastlane installation, it would still need to be duplicated in the Fastfile because some steps are not supported in Android, but are in iOS, or vice-versa
it would still need to be duplicated in the Fastfile because some steps are not supported in Android, but are in iOS, or vice-versa
This doesn't really matter, you can have iOS-specific and Android-specific steps in a single Fastfile, e.g.:
platform :android do
desc 'Upload a new Android testing build to Google Play'
lane :deploy_tst do
# ...
end
end
platform :ios do
desc 'Upload a new iOS testing build to TestFlight'
lane :deploy_tst do
# ...
end
end
The above could be run with:
bundle exec fastlane trigger android deploy_tst
# or
bundle exec fastlane trigger ios deploy_tst
Another good idea is to use a Ruby linter for to use for Fastfiles – Rubocop. I can help with setup, it's pretty simple anyway:)
That is my point, although the lanes are all in one file, most of them will still need to have an android and ios variants. I'll see what is possible in this regard, but since the two-fastlane approach is the recommended one, I'm inclined to sticking by it (since it is better for the future maintainability of the project - more people will more easily understand what is going on)
Sure, I see you and understand the preference for going with the docs.