Setup CI on Gitlab for Flutter
9,476
Solution 1
I suggest to setup your GitLab CI integration for flutter treating the android
and ios
project folder by their own in order to build your APK
or IPA
or doing test with your GitLab CI.
To start having a clue on how to setup a CI for Android
and iOS
projects on GitLab
I'll suggest you these readings:
Android:
iOS
- https://about.gitlab.com/2016/03/10/setting-up-gitlab-ci-for-ios-projects/
- https://medium.com/flawless-app-stories/how-to-set-up-gitlab-continuous-integration-for-ios-projects-without-a-hustle-53c2b642c90f
UPDATE: using Fastlane
I've the above solutions running on my apps and so I know they work. But I've found these interesting official docs for flutter using Fastlane
(they seem quite easier):
- https://flutter.io/docs/deployment/fastlane-cd
- https://docs.fastlane.tools/best-practices/continuous-integration/gitlab/
So I suggest to give them a try too.
Solution 2
.gitlab-ci.yml in your repo root:
stages:
- test
tests:
image: cirrusci/flutter
stage: test
script:
- flutter test
Author by
Pierre Le Brun
Updated on December 09, 2022Comments
-
Pierre Le Brun over 1 year
I am trying to setup CI for my flutter project on gitlab but I don't understand where to start or what I have to do. Can anyone help me? Thanks
-
shadowsheep over 5 years@PierreLeBrun I've also found (but not actually tried) some very nice docs (also official) using Fastlane. And fastlane could be easily integrated with GitLab. So give it a try!
-
Pierre Le Brun over 5 yearsI have alreasy tried to use fastane and I suceeded in setting it up locally but have no idea how to move it to gitlab (using docker and such) so I was looking for alternatives. :)
-
Pierre Le Brun over 5 yearsThanks man, i didn't use fastlane but my CI works for android. Now I have a problem when i initialize gradle, can you help me or I create an other topic ?
-
shadowsheep over 5 years@PierreLeBrun best practice should be to create (or search if there is already one that target your issue) question. Btw I could help you with this issue too, if you post another question, let me know the link. I guess this should be tagged only GitLab and gradle and android or even gradle and android only.
-
Pierre Le Brun over 5 yearsI create a new one (i don't find a topic on my issue). This is the link stackoverflow.com/questions/54424874/…