Skip to content

Instantly share code, notes, and snippets.

@ddikman
Created September 8, 2021 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddikman/f46d785cff4807a590e7f87b2453758b to your computer and use it in GitHub Desktop.
Save ddikman/f46d785cff4807a590e7f87b2453758b to your computer and use it in GitHub Desktop.
Gitlab CI for flutter build with caching packages folder
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