Skip to content

Commit

Permalink
remove codecov from failing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
casvanluijtelaar committed Jun 10, 2022
1 parent c4ed573 commit a55b5e2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 45 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,14 @@ jobs:
- name: Install dependencies
run: flutter pub get

# Uncomment this step to verify the use of 'dart format' on each commit.
# - name: Verify formatting
# run: dart format --output=none --set-exit-if-changed .
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .

# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run tests
run: flutter test --coverage

- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
verbose: true # optional (default = false)
# - uses: codecov/codecov-action@v1
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# verbose: true # optional (default = false)

74 changes: 39 additions & 35 deletions test/src/reorderable_grid_view_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,48 @@ import 'package:reorderable_grid/reorderable_grid.dart';
void main() {
const double itemHeight = 48.0;

testWidgets('ReorderableGridView.builder asserts on negative childCount',
(WidgetTester tester) async {
expect(
() => ReorderableGridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
testWidgets(
'ReorderableGridView.builder asserts on negative childCount',
(WidgetTester tester) async {
expect(
() => ReorderableGridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
),
itemBuilder: (BuildContext context, int index) {
return const SizedBox();
},
itemCount: -1,
onReorder: (int from, int to) {},
),
itemBuilder: (BuildContext context, int index) {
return const SizedBox();
},
itemCount: -1,
onReorder: (int from, int to) {},
),
throwsAssertionError);
});
throwsAssertionError);
},
);

testWidgets('ReorderableGridView.builder only creates the children it needs',
(WidgetTester tester) async {
final Set<int> itemsCreated = <int>{};
await tester.pumpWidget(MaterialApp(
home: ReorderableGridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
testWidgets(
'ReorderableGridView.builder only creates the children it needs',
(WidgetTester tester) async {
final Set<int> itemsCreated = <int>{};
await tester.pumpWidget(MaterialApp(
home: ReorderableGridView.builder(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
),
itemBuilder: (BuildContext context, int index) {
itemsCreated.add(index);
return Text(index.toString(), key: ValueKey<int>(index));
},
itemCount: 1000,
onReorder: (int from, int to) {},
),
itemBuilder: (BuildContext context, int index) {
itemsCreated.add(index);
return Text(index.toString(), key: ValueKey<int>(index));
},
itemCount: 1000,
onReorder: (int from, int to) {},
),
));

expect(itemsCreated, <int>{
...{0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
...{10, 11, 12, 13, 14, 15, 16, 17, 18, 19},
});
});
));

expect(itemsCreated, <int>{
...{0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
...{10, 11, 12, 13, 14, 15, 16, 17, 18, 19},
});
},
);

testWidgets('Animation test when placing an item in place',
(WidgetTester tester) async {
Expand Down

0 comments on commit a55b5e2

Please sign in to comment.