Skip to content

Commit

Permalink
Add codecov (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
xvrh authored Feb 21, 2024
1 parent 8881e35 commit 31ab666
Show file tree
Hide file tree
Showing 18 changed files with 141 additions and 67 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/analyze-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ on:
jobs:
analyze_and_test:
name: Flutter analyze
strategy:
matrix:
flutter: ['stable']
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: ${{ matrix.flutter }}
channel: 'stable'
- run: flutter doctor
- run: flutter --version
- run: flutter pub get
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Coverage
on:
pull_request:
push:
branches:
- master

jobs:
coverage:
name: Coverage
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter test --coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 0 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ linter:
avoid_js_rounded_ints: true
avoid_positional_boolean_parameters: true
avoid_redundant_argument_values: true
avoid_returning_null_for_future: true
avoid_setters_without_getters: true
avoid_type_to_string: true
avoid_unused_constructor_parameters: true
Expand Down
48 changes: 40 additions & 8 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.7"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -166,34 +190,34 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev"
source: hosted
version: "0.12.16"
version: "0.12.16+1"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.11.0"
path:
dependency: "direct main"
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev"
source: hosted
version: "1.8.3"
version: "1.9.0"
path_provider:
dependency: "direct main"
description:
Expand Down Expand Up @@ -335,6 +359,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
web:
dependency: transitive
description:
Expand Down
60 changes: 30 additions & 30 deletions lib/src/lottie_property.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,54 @@ import 'dart:ui';
import 'value/drop_shadow.dart';

/// Property values are the same type as the generic type of their corresponding
/// {@link LottieValueCallback}. With this, we can use generics to maintain type safety
/// [LottieValueCallback]. With this, we can use generics to maintain type safety
/// of the callbacks.
///
/// Supported properties:
/// Transform:
/// {@link #TRANSFORM_ANCHOR_POINT}
/// {@link #TRANSFORM_POSITION}
/// {@link #TRANSFORM_OPACITY}
/// {@link #TRANSFORM_SCALE}
/// {@link #TRANSFORM_ROTATION}
/// {@link #TRANSFORM_SKEW}
/// {@link #TRANSFORM_SKEW_ANGLE}
/// {TRANSFORM_ANCHOR_POINT}
/// {TRANSFORM_POSITION}
/// {TRANSFORM_OPACITY}
/// {TRANSFORM_SCALE}
/// {TRANSFORM_ROTATION}
/// {TRANSFORM_SKEW}
/// {TRANSFORM_SKEW_ANGLE}
///
/// Fill:
/// {@link #COLOR} (non-gradient)
/// {@link #OPACITY}
/// {@link #COLOR_FILTER}
/// {#COLOR} (non-gradient)
/// {#OPACITY}
/// {#COLOR_FILTER}
///
/// Stroke:
/// {@link #COLOR} (non-gradient)
/// {@link #STROKE_WIDTH}
/// {@link #OPACITY}
/// {@link #COLOR_FILTER}
/// {#COLOR} (non-gradient)
/// {#STROKE_WIDTH}
/// {#OPACITY}
/// {#COLOR_FILTER}
///
/// Ellipse:
/// {@link #POSITION}
/// {@link #ELLIPSE_SIZE}
/// {#POSITION}
/// {#ELLIPSE_SIZE}
///
/// Polystar:
/// {@link #POLYSTAR_POINTS}
/// {@link #POLYSTAR_ROTATION}
/// {@link #POSITION}
/// {@link #POLYSTAR_INNER_RADIUS} (star)
/// {@link #POLYSTAR_OUTER_RADIUS}
/// {@link #POLYSTAR_INNER_ROUNDEDNESS} (star)
/// {@link #POLYSTAR_OUTER_ROUNDEDNESS}
/// {#POLYSTAR_POINTS}
/// {#POLYSTAR_ROTATION}
/// {#POSITION}
/// {#POLYSTAR_INNER_RADIUS} (star)
/// {#POLYSTAR_OUTER_RADIUS}
/// {#POLYSTAR_INNER_ROUNDEDNESS} (star)
/// {#POLYSTAR_OUTER_ROUNDEDNESS}
///
/// Repeater:
/// All transform properties
/// {@link #REPEATER_COPIES}
/// {@link #REPEATER_OFFSET}
/// {@link #TRANSFORM_ROTATION}
/// {@link #TRANSFORM_START_OPACITY}
/// {@link #TRANSFORM_END_OPACITY}
/// {#REPEATER_COPIES}
/// {#REPEATER_OFFSET}
/// {#TRANSFORM_ROTATION}
/// {#TRANSFORM_START_OPACITY}
/// {#TRANSFORM_END_OPACITY}
///
/// Layers:
/// All transform properties
/// {@link #TIME_REMAP} (composition layers only)
/// {#TIME_REMAP} (composition layers only)
abstract class LottieProperty {
/// ColorInt **/
static const Color color = Color(0x00000001);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/parser/moshi/buffer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Buffer {
}

/// Reads and discards {@code byteCount} bytes from this source. Throws an
/// {@link java.io.EOFException} if the source is exhausted before the
/// [Exception] if the source is exhausted before the
/// requested bytes can be skipped.
void skip(int byteCount) {
_start += byteCount;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/parser/moshi/json_utf8_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ class JsonUtf8Reader extends JsonReader {

/// Returns the next character in the stream that is neither whitespace nor a
/// part of a comment. When this returns, the returned character is always at
/// {@code buffer.getByte(0)}.
/// {buffer.getByte(0)}.
int _nextNonWhitespace(bool throwOnEof) {
// This code uses ugly local variables 'p' and 'l' representing the 'pos'
// and 'limit' fields respectively. Using locals rather than fields saves
Expand Down
2 changes: 1 addition & 1 deletion lib/src/providers/asset_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class AssetLottie extends LottieProvider {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (other.runtimeType != runtimeType) return false;
return other is AssetLottie &&
other.keyName == keyName &&
Expand Down
2 changes: 1 addition & 1 deletion lib/src/providers/file_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class FileLottie extends LottieProvider {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (other.runtimeType != runtimeType) return false;
return other is FileLottie && io.areFilesEqual(file, other.file);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/providers/memory_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MemoryLottie extends LottieProvider {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (other.runtimeType != runtimeType) return false;

//TODO(xha): compare bytes content
Expand Down
2 changes: 1 addition & 1 deletion lib/src/providers/network_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class NetworkLottie extends LottieProvider {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (other.runtimeType != runtimeType) return false;
return other is NetworkLottie &&
other.url == url &&
Expand Down
2 changes: 1 addition & 1 deletion lib/src/utils/misc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class MiscUtils {
/// it to the accumulator list.
///
/// Any {@link KeyPathElementContent} should call through to this as its implementation of
/// {@link KeyPathElementContent#resolveKeyPath(KeyPath, int, List, KeyPath)}.
/// {KeyPathElementContent#resolveKeyPath(KeyPath, int, List, KeyPath)}.
static void resolveKeyPath(
KeyPath keyPath,
int depth,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/value_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ class ResolvedValueDelegate<T> {
/// to multiple contents. In that case, the callbacks's value will apply to all of them.
/// <p>
/// Internally, this will check if the {@link KeyPath} has already been resolved with
/// {@link #resolveKeyPath(KeyPath)} and will resolve it if it hasn't.
/// {#resolveKeyPath(KeyPath)} and will resolve it if it hasn't.
void addValueCallback(LottieDrawable drawable) {
var invalidate = false;
if (valueDelegate.keyPath.isEmpty) {
Expand Down
Loading

0 comments on commit 31ab666

Please sign in to comment.