Skip to content

Commit

Permalink
refactor: always verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Oct 16, 2023
1 parent 9c8b746 commit 53d73d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- cron: "0 0 * * *"

env:
GIT_CONFIG_NAME: "[Automated] Yui"
GIT_CONFIG_NAME: "github-actions"
GIT_CONFIG_EMAIL: [email protected]
GIT_OUTPUT_DIR: dist/summary
GIT_OUTPUT_BRANCH: summary
GIT_COMMIT_MSG: "[automated] update summary (${{ github.sha }})"

jobs:
test:
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
Expand Down
27 changes: 3 additions & 24 deletions test/all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import '../tools/utils.dart';
import 'files.dart';

class TestAll {
TestAll({
required this.verbose,
});

final bool verbose;

final Map<String, Map<String, Benchmarks>> animeResults =
<String, Map<String, Benchmarks>>{};

Expand Down Expand Up @@ -46,7 +40,6 @@ class TestAll {
}

print('Tested: $k');
if (verbose) print(' ');
}

Future<void> finish() async {
Expand Down Expand Up @@ -184,31 +177,17 @@ Future<void> main(final List<String> args) async {
final bool ci = args.contains('--ci');

await Procedure.run(() async {
final TestAll tester = TestAll(verbose: !ci);
final TestAll tester = TestAll();
await tester.init();

final List<Future<void> Function()> fns = <Future<void> Function()>[
...TestFiles.anime.entries.map(
(final MapEntry<TenkaLocalFileDS, MockedAnimeExtractor> x) =>
() => tester.run(
TenkaType.anime,
x.key,
() => x.value.run(
x.key,
verbose: !ci,
),
),
() => tester.run(TenkaType.anime, x.key, () => x.value.run(x.key)),
),
...TestFiles.manga.entries.map(
(final MapEntry<TenkaLocalFileDS, MockedMangaExtractor> x) =>
() => tester.run(
TenkaType.manga,
x.key,
() => x.value.run(
x.key,
verbose: !ci,
),
),
() => tester.run(TenkaType.manga, x.key, () => x.value.run(x.key)),
),
];

Expand Down

0 comments on commit 53d73d4

Please sign in to comment.