Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up CI and coverage #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .analysis_options
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
analyzer:
exclude:
- integrate/**
linter:
rules:
- annotate_overrides
- avoid_empty_else
- avoid_init_to_null
- avoid_return_types_on_setters
- camel_case_types
- empty_constructor_bodies
- hash_and_equals
- library_names
- library_prefixes
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_is_not_empty
- slash_for_doc_comments
- sort_constructors_first
- sort_unnamed_constructors_first
- type_init_formals
- unnecessary_brace_in_string_interp
- unnecessary_getters_setters
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: dart
dart:
- stable
with_content_shell: true
before_install:
- export DISPLAY=:99.0
- ./tool/setup_dartium.sh
- export PATH=$PATH":$PWD"
- sh -e /etc/init.d/xvfb start
script:
- pub run dart_dev analyze
- pub run dart_dev test
- ./generate_coverage.sh
- bash <(curl -s https://codecov.io/bash) -f coverage/coverage.lcov
6 changes: 1 addition & 5 deletions lib/src/component/resize_sensor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class ResizeSensorComponent extends UiComponent<ResizeSensorProps> {

Element _expandSensorChildRef;
Element _expandSensorRef;
Element _collapseSensorChildRef;
Element _collapseSensorRef;

@override
Expand Down Expand Up @@ -115,10 +114,7 @@ class ResizeSensorComponent extends UiComponent<ResizeSensorProps> {
..key = 'expandSensor'
)(expandSensorChild);

var collapseSensorChild = (Dom.div()
..ref = (ref) { _collapseSensorChildRef = ref; }
..style = _collapseSensorChildStyle
)();
var collapseSensorChild = (Dom.div()..style = _collapseSensorChildStyle)();

var collapseSensor = (Dom.div()
..className = 'resize-sensor-collapse'
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: over_react
publish_to: https://pub.workiva.org
version: 1.0.0
description: A library for building statically-typed React UI components using Dart.
homepage: https://github.com/Workiva/over_react/
Expand Down
1 change: 0 additions & 1 deletion tool/dev.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import 'package:dart_dev/dart_dev.dart' show dev, config;
main(List<String> args) async {
const directories = const <String>[
'lib/',
'example/',
'test/',
'tool/',
];
Expand Down
4 changes: 4 additions & 0 deletions tool/generate_coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

# DART_FLAGS has to be set to `--checked` because dart_dev does not run tests in checked mode.
DART_FLAGS=--checked pub run dart_dev coverage --no-html --no-open