Skip to content

Instantly share code, notes, and snippets.

@ddikman
Created July 3, 2021 09:46
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/a8a21e05c55137ee50983a580c81d501 to your computer and use it in GitHub Desktop.
Save ddikman/a8a21e05c55137ee50983a580c81d501 to your computer and use it in GitHub Desktop.
Flutter three step build and test job
stages:
- lint
- test
- coverage
default:
image: greycastle/jreader:2.3.0
cache:
paths:
- /flutter/bin/cache/dart-sdk
lint:
stage: lint
script:
- flutter analyze
test:
stage: test
script:
- pub global activate junitreport
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- flutter pub get
- flutter test --coverage --machine | tojunit > testreport.xml
artifacts:
reports:
junit: testreport.xml
paths:
- coverage
coverage:
stage: coverage
script:
- genhtml coverage/lcov.info --output=coverage
- mv coverage/ public/
artifacts:
paths:
- public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment