Skip to content

Commit 8aa223a

Browse files
authored
ci: example workflow workingdir (#16)
1 parent be2c077 commit 8aa223a

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

.github/workflows/example.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ jobs:
2222

2323
build:
2424
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
25+
with:
26+
working_directory: "example/"

example/lib/src/commands/some_other_commmand.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class _SomeSubCommand extends Command<int> {
3131

3232
@override
3333
Future<int> run() async {
34+
_logger.info(description);
3435
for (final rest in argResults!.rest) {
3536
_logger.info(' - $rest');
3637
}

example/test/src/commands/some_other_command_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ void main() {
2525

2626
expect(exitCode, ExitCode.success.code);
2727

28+
verify(() => logger.info('A sub command of some_other_command'))
29+
.called(1);
2830
verify(() => logger.info(' - anything')).called(1);
2931
verify(() => logger.info(' - after')).called(1);
3032
verify(() => logger.info(' - command')).called(1);

0 commit comments

Comments
 (0)