### ----------------------------------------------------
### -- App::Workflows::Github
### -- Licenses: Artistic-2.0
### -- Authors: rcmlz
### -- File: t/01-basic.rakutest
### ----------------------------------------------------
use Test;
use lib 'lib';
use App::Workflows::Github;

my Str $tmp = $*TMPDIR.Str;

my @files = <runner dispatch Linux MacOS Windows> >>~>> ".yml";

my IO $out = workflow-dir($tmp);
my $cmd="raku -I . -- bin/create-workflows-4-github --force --base-dir=$tmp";

plan @files + 2;

is shell($cmd).exitcode, 0, $cmd;

my $script-name = "run-tests.raku";
ok $tmp.IO.add($script-name).e, $script-name;

ok $out.IO.add($_).e, $_ for @files;

say "Cleaning up";
say "{$out.IO.add($_)} :" ~ $out.IO.add($_).unlink for @files;
say "$out :" ~ $out.IO.rmdir;

done-testing;


