forked from rrousselGit/riverpod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ddbb5c
commit 937d8ca
Showing
62 changed files
with
16,541 additions
and
407 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ name: Build | |
on: | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
- "**.md" | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- '**.md' | ||
- "**.md" | ||
schedule: | ||
# runs the CI everyday at 10AM | ||
- cron: "0 10 * * *" | ||
|
@@ -17,40 +17,71 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: ${{ matrix.package_path }} | ||
|
||
strategy: | ||
matrix: | ||
channel: | ||
- stable | ||
package_path: | ||
- examples/counter | ||
# TODO(rrousselGit) run CI on marvel once test | ||
# - examples/marvel | ||
- examples/pub | ||
- examples/random_number | ||
- examples/stackoverflow | ||
- examples/todos | ||
- packages/riverpod | ||
- packages/riverpod/example | ||
- packages/flutter_riverpod | ||
- packages/flutter_riverpod/example | ||
- packages/hooks_riverpod | ||
- packages/hooks_riverpod/example | ||
- packages/riverpod_annotation | ||
# TODO(rrousselGit) update riverpod_cli test setup to be supported by the CI | ||
# - packages/riverpod_cli | ||
- packages/riverpod_generator | ||
# TODO(rrousselGit) update riverpod_graph test setup to be supported by the CI | ||
# - packages/riverpod_graph | ||
- packages/riverpod_lint | ||
# TODO(rousselGit) blocked by https://github.com/invertase/dart_custom_lint/issues/16 | ||
# - packages/riverpod_lint_flutter_test | ||
- website | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: subosito/flutter-action@v2 | ||
- uses: actions/[email protected] | ||
- uses: subosito/[email protected] | ||
with: | ||
channel: ${{ matrix.channel }} | ||
|
||
- name: Add pub cache bin to PATH | ||
run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH | ||
|
||
- name: Add pub cache to PATH | ||
run: echo "PUB_CACHE="$HOME/.pub-cache"" >> $GITHUB_ENV | ||
|
||
- run: dart pub global activate melos | ||
|
||
- name: Install dependencies | ||
run: melos bootstrap --ignore "codemod_riverpod_*,riverpod_cli" | ||
run: flutter pub get | ||
|
||
- name: Check format | ||
run: melos exec --ignore="website_snippets" -- "flutter format --set-exit-if-changed ." | ||
|
||
- name: Generate | ||
run: melos exec --depends-on="build_runner" -- "dart run build_runner build --delete-conflicting-outputs" | ||
run: flutter format --set-exit-if-changed . | ||
if: matrix.package_path != 'website' | ||
|
||
- name: Analyze | ||
run: melos exec --ignore="codemod_riverpod_test*,riverpod_lint_flutter_test" -- "flutter analyze" | ||
run: flutter analyze | ||
|
||
- name: Run tests | ||
run: melos run test | ||
run: | | ||
if test -d "test"; then | ||
if grep -q flutter "pubspec.yaml"; then | ||
flutter test --coverage | ||
else | ||
dart test | ||
fi | ||
fi | ||
- name: Upload coverage to codecov | ||
run: curl -s https://codecov.io/bash | bash | ||
run: | | ||
if test -d "test"; then | ||
curl -s https://codecov.io/bash | bash | ||
fi |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
part of 'main.dart'; | ||
|
||
String getFoo() => 'Hello world 42'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
// coverage:ignore-file | ||
// GENERATED CODE - DO NOT MODIFY BY HAND | ||
// ignore_for_file: type=lint | ||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target | ||
|
||
part of 'configuration.dart'; | ||
|
||
// ************************************************************************** | ||
// FreezedGenerator | ||
// ************************************************************************** | ||
|
||
T _$identity<T>(T value) => value; | ||
|
||
final _privateConstructorUsedError = UnsupportedError( | ||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); | ||
|
||
Configuration _$ConfigurationFromJson(Map<String, dynamic> json) { | ||
return _Configuration.fromJson(json); | ||
} | ||
|
||
/// @nodoc | ||
mixin _$Configuration { | ||
String get publicKey => throw _privateConstructorUsedError; | ||
String get privateKey => throw _privateConstructorUsedError; | ||
|
||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError; | ||
@JsonKey(ignore: true) | ||
$ConfigurationCopyWith<Configuration> get copyWith => | ||
throw _privateConstructorUsedError; | ||
} | ||
|
||
/// @nodoc | ||
abstract class $ConfigurationCopyWith<$Res> { | ||
factory $ConfigurationCopyWith( | ||
Configuration value, $Res Function(Configuration) then) = | ||
_$ConfigurationCopyWithImpl<$Res, Configuration>; | ||
@useResult | ||
$Res call({String publicKey, String privateKey}); | ||
} | ||
|
||
/// @nodoc | ||
class _$ConfigurationCopyWithImpl<$Res, $Val extends Configuration> | ||
implements $ConfigurationCopyWith<$Res> { | ||
_$ConfigurationCopyWithImpl(this._value, this._then); | ||
|
||
// ignore: unused_field | ||
final $Val _value; | ||
// ignore: unused_field | ||
final $Res Function($Val) _then; | ||
|
||
@pragma('vm:prefer-inline') | ||
@override | ||
$Res call({ | ||
Object? publicKey = null, | ||
Object? privateKey = null, | ||
}) { | ||
return _then(_value.copyWith( | ||
publicKey: null == publicKey | ||
? _value.publicKey | ||
: publicKey // ignore: cast_nullable_to_non_nullable | ||
as String, | ||
privateKey: null == privateKey | ||
? _value.privateKey | ||
: privateKey // ignore: cast_nullable_to_non_nullable | ||
as String, | ||
) as $Val); | ||
} | ||
} | ||
|
||
/// @nodoc | ||
abstract class _$$_ConfigurationCopyWith<$Res> | ||
implements $ConfigurationCopyWith<$Res> { | ||
factory _$$_ConfigurationCopyWith( | ||
_$_Configuration value, $Res Function(_$_Configuration) then) = | ||
__$$_ConfigurationCopyWithImpl<$Res>; | ||
@override | ||
@useResult | ||
$Res call({String publicKey, String privateKey}); | ||
} | ||
|
||
/// @nodoc | ||
class __$$_ConfigurationCopyWithImpl<$Res> | ||
extends _$ConfigurationCopyWithImpl<$Res, _$_Configuration> | ||
implements _$$_ConfigurationCopyWith<$Res> { | ||
__$$_ConfigurationCopyWithImpl( | ||
_$_Configuration _value, $Res Function(_$_Configuration) _then) | ||
: super(_value, _then); | ||
|
||
@pragma('vm:prefer-inline') | ||
@override | ||
$Res call({ | ||
Object? publicKey = null, | ||
Object? privateKey = null, | ||
}) { | ||
return _then(_$_Configuration( | ||
publicKey: null == publicKey | ||
? _value.publicKey | ||
: publicKey // ignore: cast_nullable_to_non_nullable | ||
as String, | ||
privateKey: null == privateKey | ||
? _value.privateKey | ||
: privateKey // ignore: cast_nullable_to_non_nullable | ||
as String, | ||
)); | ||
} | ||
} | ||
|
||
/// @nodoc | ||
@JsonSerializable(fieldRename: FieldRename.snake) | ||
class _$_Configuration implements _Configuration { | ||
_$_Configuration({required this.publicKey, required this.privateKey}); | ||
|
||
factory _$_Configuration.fromJson(Map<String, dynamic> json) => | ||
_$$_ConfigurationFromJson(json); | ||
|
||
@override | ||
final String publicKey; | ||
@override | ||
final String privateKey; | ||
|
||
@override | ||
String toString() { | ||
return 'Configuration(publicKey: $publicKey, privateKey: $privateKey)'; | ||
} | ||
|
||
@override | ||
bool operator ==(dynamic other) { | ||
return identical(this, other) || | ||
(other.runtimeType == runtimeType && | ||
other is _$_Configuration && | ||
(identical(other.publicKey, publicKey) || | ||
other.publicKey == publicKey) && | ||
(identical(other.privateKey, privateKey) || | ||
other.privateKey == privateKey)); | ||
} | ||
|
||
@JsonKey(ignore: true) | ||
@override | ||
int get hashCode => Object.hash(runtimeType, publicKey, privateKey); | ||
|
||
@JsonKey(ignore: true) | ||
@override | ||
@pragma('vm:prefer-inline') | ||
_$$_ConfigurationCopyWith<_$_Configuration> get copyWith => | ||
__$$_ConfigurationCopyWithImpl<_$_Configuration>(this, _$identity); | ||
|
||
@override | ||
Map<String, dynamic> toJson() { | ||
return _$$_ConfigurationToJson( | ||
this, | ||
); | ||
} | ||
} | ||
|
||
abstract class _Configuration implements Configuration { | ||
factory _Configuration( | ||
{required final String publicKey, | ||
required final String privateKey}) = _$_Configuration; | ||
|
||
factory _Configuration.fromJson(Map<String, dynamic> json) = | ||
_$_Configuration.fromJson; | ||
|
||
@override | ||
String get publicKey; | ||
@override | ||
String get privateKey; | ||
@override | ||
@JsonKey(ignore: true) | ||
_$$_ConfigurationCopyWith<_$_Configuration> get copyWith => | ||
throw _privateConstructorUsedError; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.