Created
September 8, 2021 11:35
-
-
Save ddikman/f46d785cff4807a590e7f87b2453758b to your computer and use it in GitHub Desktop.
Gitlab CI for flutter build with caching packages folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cache: | |
paths: | |
- $CI_PROJECT_DIR/.pub-cache/ | |
build: | |
image: greycastle/flutter:2.2.3 | |
script: | |
- export PUB_CACHE=$CI_PROJECT_DIR/.pub-cache | |
- export PATH="$PATH":"$PUB_CACHE/bin" | |
- flutter pub get | |
- flutter analyze --no-pub | |
- pub global activate junitreport | |
- flutter test --coverage --machine | tojunit > testreport.xml | |
- genhtml coverage/lcov.info --output=coverage | |
- mv coverage/ public/ | |
artifacts: | |
reports: | |
junit: testreport.xml | |
paths: | |
- public |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment