Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
ed2c24ba
Commit
ed2c24ba
authored
Jun 22, 2016
by
Adam Barth
Committed by
GitHub
Jun 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add coveralls support to Travis (#4690)
This patch causes us to upload a coverage report to coveralls.io.
parent
0f2c3dc0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
.travis.yml
.travis.yml
+4
-0
test.sh
dev/bots/test.sh
+6
-1
coverage_collector.dart
packages/flutter_tools/lib/src/test/coverage_collector.dart
+2
-3
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+2
-2
No files found.
.travis.yml
View file @
ed2c24ba
...
...
@@ -6,10 +6,14 @@ addons:
-
ubuntu-toolchain-r-test
# if we don't specify this, the libstdc++6 we get is the wrong version
packages
:
-
libstdc++6
install
:
-
gem install coveralls-lcov
before_script
:
-
./dev/bots/setup.sh
script
:
-
./dev/bots/test.sh
after_success
:
-
coveralls-lcov packages/flutter/coverage/lcov.info
cache
:
directories
:
-
$HOME/.pub-cache
dev/bots/test.sh
View file @
ed2c24ba
...
...
@@ -23,8 +23,13 @@ flutter analyze --flutter-repo
(
cd
dev/automated_tests
;
!
flutter
test
test_smoke_test/fail_test.dart
>
/dev/null
)
(
cd
dev/automated_tests
;
flutter
test
test_smoke_test/pass_test.dart
>
/dev/null
)
COVERAGE_FLAG
=
if
[
-n
$TRAVIS
]
;
then
COVERAGE_FLAG
=
--coverage
fi
# run tests
(
cd
packages/flutter
;
flutter
test
)
(
cd
packages/flutter
;
flutter
test
$COVERAGE_FLAG
)
(
cd
packages/flutter_driver
;
dart
-c
test
/all.dart
)
(
cd
packages/flutter_sprites
;
flutter
test
)
(
cd
packages/flutter_test
;
flutter
test
)
...
...
packages/flutter_tools/lib/src/test/coverage_collector.dart
View file @
ed2c24ba
...
...
@@ -8,6 +8,7 @@ import 'dart:io';
import
'package:coverage/coverage.dart'
;
import
'package:path/path.dart'
as
path
;
import
'../dart/package_map.dart'
;
import
'../globals.dart'
;
class
CoverageCollector
{
...
...
@@ -61,9 +62,7 @@ class CoverageCollector {
assert
(
enabled
);
await
finishPendingJobs
();
printTrace
(
'formating coverage data'
);
// TODO(abarth): Use PackageMap.globalPackagesPath once
// https://github.com/dart-lang/coverage/issues/100 is fixed.
Resolver
resolver
=
new
Resolver
(
packageRoot:
path
.
absolute
(
'packages'
));
Resolver
resolver
=
new
Resolver
(
packagesPath:
PackageMap
.
globalPackagesPath
);
Formatter
formater
=
new
LcovFormatter
(
resolver
);
List
<
String
>
reportOn
=
<
String
>[
path
.
join
(
Directory
.
current
.
path
,
'lib'
)];
return
await
formater
.
format
(
_globalHitmap
,
reportOn:
reportOn
);
...
...
packages/flutter_tools/pubspec.yaml
View file @
ed2c24ba
...
...
@@ -10,7 +10,7 @@ environment:
dependencies
:
archive
:
^1.0.20
args
:
^0.13.4
coverage
:
^0.7.
7
coverage
:
^0.7.
8
crypto
:
'
>=1.1.1
<3.0.0'
file
:
^0.1.0
http
:
^0.11.3
...
...
@@ -18,7 +18,7 @@ dependencies:
json_schema
:
^1.0.3
linter
:
^0.1.17
mustache4dart
:
^1.0.0
package_config
:
^0.1.3
package_config
:
'
>=0.1.5
<2.0.0'
path
:
^1.3.0
pub_semver
:
^1.0.0
stack_trace
:
^1.4.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment