Created
November 14, 2018 15:59
-
-
Save sudhanshu-15/582cb90567306b6e5b56b90688f2e2d7 to your computer and use it in GitHub Desktop.
Jenkins file for Flutter tests
This file contains hidden or 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
pipeline { | |
agent any | |
stages { | |
stage ('Checkout') { | |
steps { | |
checkout scm | |
} | |
} | |
stage ('Download lcov converter') { | |
steps { | |
sh "curl -O https://raw.githubusercontent.com/eriwen/lcov-to-cobertura-xml/master/lcov_cobertura/lcov_cobertura.py" | |
} | |
} | |
stage ('Flutter Doctor') { | |
steps { | |
sh "flutter doctor" | |
} | |
} | |
stage('Test') { | |
steps { | |
sh "flutter test --coverage" | |
} | |
post { | |
always { | |
sh "python3 lcov_cobertura.py coverage/lcov.info --output coverage/coverage.xml" | |
step([$class: 'CoberturaPublisher', coberturaReportFile: 'coverage/coverage.xml']) | |
} | |
} | |
} | |
stage('Run Analyzer') { | |
steps { | |
sh "dartanalyzer --options analysis_options.yaml ." | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment