| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
640
|
use 5.14.0; |
|
|
1
|
|
|
|
|
4
|
|
|
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
34
|
|
|
3
|
1
|
|
|
1
|
|
32
|
use warnings; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
72
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Dist::Zilla::Plugin::Author::CSSON::GithubActions::Role::Workflow; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Role used to define a GithubActions workflow |
|
8
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY |
|
9
|
|
|
|
|
|
|
our $VERSION = '0.0101'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
7
|
use Moose::Role; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
23
|
|
|
12
|
1
|
|
|
1
|
|
5355
|
use YAML::XS qw/Load/; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
82
|
|
|
13
|
1
|
|
|
1
|
|
8
|
use Path::Tiny; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
96
|
|
|
14
|
1
|
|
|
1
|
|
592
|
use File::ShareDir qw/dist_dir/; |
|
|
1
|
|
|
|
|
18615
|
|
|
|
1
|
|
|
|
|
74
|
|
|
15
|
1
|
|
|
1
|
|
8
|
use Try::Tiny; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
219
|
|
|
16
|
|
|
|
|
|
|
requires 'filepath'; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub file_location { |
|
19
|
5
|
|
|
5
|
0
|
18
|
my $self = shift; |
|
20
|
5
|
|
|
|
|
37
|
my $package = $self->main_module; |
|
21
|
5
|
|
|
|
|
47
|
$package =~ s{::}{-}g; |
|
22
|
|
|
|
|
|
|
|
|
23
|
5
|
|
|
|
|
28
|
my $dir = path('.'); |
|
24
|
|
|
|
|
|
|
try { |
|
25
|
5
|
|
|
5
|
|
431
|
$dir = path(dist_dir($package)); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
5
|
|
|
5
|
|
234
|
finally { }; |
|
28
|
|
|
|
|
|
|
|
|
29
|
5
|
|
|
|
|
91
|
return $dir->child($self->filepath); |
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
sub yaml { |
|
32
|
5
|
|
|
5
|
0
|
18
|
my $self = shift; |
|
33
|
5
|
|
|
|
|
37
|
return Load($self->file_location->slurp); |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=pod |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=encoding UTF-8 |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 NAME |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Dist::Zilla::Plugin::Author::CSSON::GithubActions::Role::Workflow - Role used to define a GithubActions workflow |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 VERSION |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Version 0.0101, released 2020-12-25. |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
In C<share/your-workflow.yml>: |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
--- |
|
57
|
|
|
|
|
|
|
filename: 'base-workflow.yml' |
|
58
|
|
|
|
|
|
|
name: 'dzil-test' |
|
59
|
|
|
|
|
|
|
on: |
|
60
|
|
|
|
|
|
|
push: |
|
61
|
|
|
|
|
|
|
branches: |
|
62
|
|
|
|
|
|
|
- '*' |
|
63
|
|
|
|
|
|
|
pull_request: |
|
64
|
|
|
|
|
|
|
branches: |
|
65
|
|
|
|
|
|
|
- '*' |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
jobs: |
|
68
|
|
|
|
|
|
|
perl-job: |
|
69
|
|
|
|
|
|
|
name: Perl ${{ matrix.perl-version }} |
|
70
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }} |
|
71
|
|
|
|
|
|
|
strategy: |
|
72
|
|
|
|
|
|
|
fail-fast: false |
|
73
|
|
|
|
|
|
|
matrix: |
|
74
|
|
|
|
|
|
|
perl-version: |
|
75
|
|
|
|
|
|
|
- '5.32' |
|
76
|
|
|
|
|
|
|
os: |
|
77
|
|
|
|
|
|
|
- 'ubuntu-latest' |
|
78
|
|
|
|
|
|
|
container: perldocker/perl-tester:${{ matrix.perl-version }} |
|
79
|
|
|
|
|
|
|
steps: |
|
80
|
|
|
|
|
|
|
- uses: actions/checkout@v2 |
|
81
|
|
|
|
|
|
|
- name: Dist::Zilla tests |
|
82
|
|
|
|
|
|
|
run: | |
|
83
|
|
|
|
|
|
|
dzil authordeps --missing | cpanm --notest |
|
84
|
|
|
|
|
|
|
dzil listdeps --missing --author | cpanm |
|
85
|
|
|
|
|
|
|
dzil test --release --author |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This class should be consumed by workflow classes. |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
The only non-standard setting in the YAML file is C<filename>. This is the filename that will be created |
|
92
|
|
|
|
|
|
|
in the C<.github/workflows> folder in the distribution that uses this plugin. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
See L<Dist::Zilla::Plugin::Author::CSSON::GithubActions::BaseWorkflow> for an example workflow. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head1 SOURCE |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
L<https://github.com/Csson/p5-Dist-Zilla-Plugin-Author-CSSON-GithubActions> |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 HOMEPAGE |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
L<https://metacpan.org/release/Dist-Zilla-Plugin-Author-CSSON-GithubActions> |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 AUTHOR |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Erik Carlsson <info@code301.com> |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
This software is copyright (c) 2020 by Erik Carlsson. |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
115
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=cut |