line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::CI; |
2
|
|
|
|
|
|
|
# DO NOT EDIT THIS; This file is automatically generated by maint/generate.pl |
3
|
1
|
|
|
1
|
|
67743
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.001'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use Exporter 'import'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
148
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
11
|
|
|
|
|
|
|
is_ci |
12
|
|
|
|
|
|
|
name |
13
|
|
|
|
|
|
|
is_pr |
14
|
|
|
|
|
|
|
APPVEYOR |
15
|
|
|
|
|
|
|
AZURE_PIPELINES |
16
|
|
|
|
|
|
|
BAMBOO |
17
|
|
|
|
|
|
|
BITBUCKET |
18
|
|
|
|
|
|
|
BITRISE |
19
|
|
|
|
|
|
|
BUDDY |
20
|
|
|
|
|
|
|
BUILDKITE |
21
|
|
|
|
|
|
|
CIRCLE |
22
|
|
|
|
|
|
|
CIRRUS |
23
|
|
|
|
|
|
|
CODEBUILD |
24
|
|
|
|
|
|
|
CODESHIP |
25
|
|
|
|
|
|
|
DRONE |
26
|
|
|
|
|
|
|
DSARI |
27
|
|
|
|
|
|
|
GITHUB_ACTIONS |
28
|
|
|
|
|
|
|
GITLAB |
29
|
|
|
|
|
|
|
GOCD |
30
|
|
|
|
|
|
|
HUDSON |
31
|
|
|
|
|
|
|
JENKINS |
32
|
|
|
|
|
|
|
MAGNUM |
33
|
|
|
|
|
|
|
NETLIFY |
34
|
|
|
|
|
|
|
NEVERCODE |
35
|
|
|
|
|
|
|
SAIL |
36
|
|
|
|
|
|
|
SEMAPHORE |
37
|
|
|
|
|
|
|
SHIPPABLE |
38
|
|
|
|
|
|
|
SOLANO |
39
|
|
|
|
|
|
|
STRIDER |
40
|
|
|
|
|
|
|
TASKCLUSTER |
41
|
|
|
|
|
|
|
TEAMCITY |
42
|
|
|
|
|
|
|
TRAVIS |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
46
|
|
|
|
|
|
|
constant => [qw( |
47
|
|
|
|
|
|
|
APPVEYOR |
48
|
|
|
|
|
|
|
AZURE_PIPELINES |
49
|
|
|
|
|
|
|
BAMBOO |
50
|
|
|
|
|
|
|
BITBUCKET |
51
|
|
|
|
|
|
|
BITRISE |
52
|
|
|
|
|
|
|
BUDDY |
53
|
|
|
|
|
|
|
BUILDKITE |
54
|
|
|
|
|
|
|
CIRCLE |
55
|
|
|
|
|
|
|
CIRRUS |
56
|
|
|
|
|
|
|
CODEBUILD |
57
|
|
|
|
|
|
|
CODESHIP |
58
|
|
|
|
|
|
|
DRONE |
59
|
|
|
|
|
|
|
DSARI |
60
|
|
|
|
|
|
|
GITHUB_ACTIONS |
61
|
|
|
|
|
|
|
GITLAB |
62
|
|
|
|
|
|
|
GOCD |
63
|
|
|
|
|
|
|
HUDSON |
64
|
|
|
|
|
|
|
JENKINS |
65
|
|
|
|
|
|
|
MAGNUM |
66
|
|
|
|
|
|
|
NETLIFY |
67
|
|
|
|
|
|
|
NEVERCODE |
68
|
|
|
|
|
|
|
SAIL |
69
|
|
|
|
|
|
|
SEMAPHORE |
70
|
|
|
|
|
|
|
SHIPPABLE |
71
|
|
|
|
|
|
|
SOLANO |
72
|
|
|
|
|
|
|
STRIDER |
73
|
|
|
|
|
|
|
TASKCLUSTER |
74
|
|
|
|
|
|
|
TEAMCITY |
75
|
|
|
|
|
|
|
TRAVIS |
76
|
|
|
|
|
|
|
)], |
77
|
|
|
|
|
|
|
); |
78
|
|
|
|
|
|
|
|
79
|
1
|
50
|
33
|
1
|
|
7
|
use constant _CI => exists $ENV{CI} || exists $ENV{CONTINUOUS_INTEGRATION} || exists $ENV{RUN_ID} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
129
|
|
80
|
1
|
50
|
|
1
|
|
6
|
use constant APPVEYOR => exists $ENV{APPVEYOR} ? 1 : 0; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
73
|
|
81
|
1
|
50
|
|
1
|
|
6
|
use constant AZURE_PIPELINES => exists $ENV{SYSTEM_TEAMFOUNDATIONCOLLECTIONURI} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
68
|
|
82
|
1
|
50
|
|
1
|
|
6
|
use constant BAMBOO => exists $ENV{bamboo_planKey} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
63
|
|
83
|
1
|
50
|
|
1
|
|
7
|
use constant BITBUCKET => exists $ENV{BITBUCKET_COMMIT} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
64
|
|
84
|
1
|
50
|
|
1
|
|
14
|
use constant BITRISE => exists $ENV{BITRISE_IO} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
61
|
|
85
|
1
|
50
|
|
1
|
|
19
|
use constant BUDDY => exists $ENV{BUDDY_WORKSPACE_ID} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
70
|
|
86
|
1
|
50
|
|
1
|
|
6
|
use constant BUILDKITE => exists $ENV{BUILDKITE} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
71
|
|
87
|
1
|
50
|
|
1
|
|
7
|
use constant CIRCLE => exists $ENV{CIRCLECI} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
63
|
|
88
|
1
|
50
|
|
1
|
|
6
|
use constant CIRRUS => exists $ENV{CIRRUS_CI} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
63
|
|
89
|
1
|
50
|
|
1
|
|
7
|
use constant CODEBUILD => exists $ENV{CODEBUILD_BUILD_ARN} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
89
|
|
90
|
1
|
50
|
33
|
1
|
|
6
|
use constant CODESHIP => exists $ENV{CI_NAME} && $ENV{CI_NAME} eq 'codeship' ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
74
|
|
91
|
1
|
50
|
|
1
|
|
6
|
use constant DRONE => exists $ENV{DRONE} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
60
|
|
92
|
1
|
50
|
|
1
|
|
6
|
use constant DSARI => exists $ENV{DSARI} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
93
|
1
|
50
|
|
1
|
|
6
|
use constant GITHUB_ACTIONS => exists $ENV{GITHUB_ACTIONS} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
60
|
|
94
|
1
|
50
|
|
1
|
|
6
|
use constant GITLAB => exists $ENV{GITLAB_CI} ? 1 : 0; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
62
|
|
95
|
1
|
50
|
|
1
|
|
6
|
use constant GOCD => exists $ENV{GO_PIPELINE_LABEL} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
67
|
|
96
|
1
|
50
|
|
1
|
|
6
|
use constant HUDSON => exists $ENV{HUDSON_URL} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
76
|
|
97
|
1
|
50
|
33
|
1
|
|
6
|
use constant JENKINS => exists $ENV{JENKINS_URL} && exists $ENV{BUILD_ID} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
65
|
|
98
|
1
|
50
|
|
1
|
|
7
|
use constant MAGNUM => exists $ENV{MAGNUM} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
67
|
|
99
|
1
|
50
|
|
1
|
|
6
|
use constant NETLIFY => exists $ENV{NETLIFY_BUILD_BASE} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
140
|
|
100
|
1
|
50
|
|
1
|
|
6
|
use constant NEVERCODE => exists $ENV{NEVERCODE} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
101
|
1
|
50
|
|
1
|
|
6
|
use constant SAIL => exists $ENV{SAILCI} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
61
|
|
102
|
1
|
50
|
|
1
|
|
6
|
use constant SEMAPHORE => exists $ENV{SEMAPHORE} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
77
|
|
103
|
1
|
50
|
|
1
|
|
7
|
use constant SHIPPABLE => exists $ENV{SHIPPABLE} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
90
|
|
104
|
1
|
50
|
|
1
|
|
6
|
use constant SOLANO => exists $ENV{TDDIUM} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
105
|
1
|
50
|
|
1
|
|
7
|
use constant STRIDER => exists $ENV{STRIDER} ? 1 : 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
67
|
|
106
|
1
|
50
|
33
|
1
|
|
6
|
use constant TASKCLUSTER => exists $ENV{TASK_ID} && exists $ENV{RUN_ID} ? 1 : 0; |
|
1
|
|
|
|
|
17
|
|
|
1
|
|
|
|
|
66
|
|
107
|
1
|
50
|
|
1
|
|
6
|
use constant TEAMCITY => exists $ENV{TEAMCITY_VERSION} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
108
|
1
|
50
|
|
1
|
|
6
|
use constant TRAVIS => exists $ENV{TRAVIS} ? 1 : 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
434
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
sub is_ci () { |
111
|
|
|
|
|
|
|
_CI |
112
|
|
|
|
|
|
|
|| APPVEYOR |
113
|
|
|
|
|
|
|
|| AZURE_PIPELINES |
114
|
|
|
|
|
|
|
|| BAMBOO |
115
|
|
|
|
|
|
|
|| BITBUCKET |
116
|
|
|
|
|
|
|
|| BITRISE |
117
|
|
|
|
|
|
|
|| BUDDY |
118
|
|
|
|
|
|
|
|| BUILDKITE |
119
|
|
|
|
|
|
|
|| CIRCLE |
120
|
|
|
|
|
|
|
|| CIRRUS |
121
|
|
|
|
|
|
|
|| CODEBUILD |
122
|
|
|
|
|
|
|
|| CODESHIP |
123
|
|
|
|
|
|
|
|| DRONE |
124
|
|
|
|
|
|
|
|| DSARI |
125
|
|
|
|
|
|
|
|| GITHUB_ACTIONS |
126
|
|
|
|
|
|
|
|| GITLAB |
127
|
|
|
|
|
|
|
|| GOCD |
128
|
|
|
|
|
|
|
|| HUDSON |
129
|
|
|
|
|
|
|
|| JENKINS |
130
|
|
|
|
|
|
|
|| MAGNUM |
131
|
|
|
|
|
|
|
|| NETLIFY |
132
|
|
|
|
|
|
|
|| NEVERCODE |
133
|
|
|
|
|
|
|
|| SAIL |
134
|
|
|
|
|
|
|
|| SEMAPHORE |
135
|
|
|
|
|
|
|
|| SHIPPABLE |
136
|
|
|
|
|
|
|
|| SOLANO |
137
|
|
|
|
|
|
|
|| STRIDER |
138
|
|
|
|
|
|
|
|| TASKCLUSTER |
139
|
|
|
|
|
|
|
|| TEAMCITY |
140
|
|
|
|
|
|
|
|| TRAVIS |
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
sub name () { |
144
|
|
|
|
|
|
|
APPVEYOR ? 'AppVeyor' |
145
|
|
|
|
|
|
|
: AZURE_PIPELINES ? 'Azure Pipelines' |
146
|
|
|
|
|
|
|
: BAMBOO ? 'Bamboo' |
147
|
|
|
|
|
|
|
: BITBUCKET ? 'Bitbucket Pipelines' |
148
|
|
|
|
|
|
|
: BITRISE ? 'Bitrise' |
149
|
|
|
|
|
|
|
: BUDDY ? 'Buddy' |
150
|
|
|
|
|
|
|
: BUILDKITE ? 'Buildkite' |
151
|
|
|
|
|
|
|
: CIRCLE ? 'CircleCI' |
152
|
|
|
|
|
|
|
: CIRRUS ? 'Cirrus CI' |
153
|
|
|
|
|
|
|
: CODEBUILD ? 'AWS CodeBuild' |
154
|
|
|
|
|
|
|
: CODESHIP ? 'Codeship' |
155
|
|
|
|
|
|
|
: DRONE ? 'Drone' |
156
|
|
|
|
|
|
|
: DSARI ? 'dsari' |
157
|
|
|
|
|
|
|
: GITHUB_ACTIONS ? 'GitHub Actions' |
158
|
|
|
|
|
|
|
: GITLAB ? 'GitLab CI' |
159
|
|
|
|
|
|
|
: GOCD ? 'GoCD' |
160
|
|
|
|
|
|
|
: HUDSON ? 'Hudson' |
161
|
|
|
|
|
|
|
: JENKINS ? 'Jenkins' |
162
|
|
|
|
|
|
|
: MAGNUM ? 'Magnum CI' |
163
|
|
|
|
|
|
|
: NETLIFY ? 'Netlify CI' |
164
|
|
|
|
|
|
|
: NEVERCODE ? 'Nevercode' |
165
|
|
|
|
|
|
|
: SAIL ? 'Sail CI' |
166
|
|
|
|
|
|
|
: SEMAPHORE ? 'Semaphore' |
167
|
|
|
|
|
|
|
: SHIPPABLE ? 'Shippable' |
168
|
|
|
|
|
|
|
: SOLANO ? 'Solano CI' |
169
|
|
|
|
|
|
|
: STRIDER ? 'Strider CD' |
170
|
|
|
|
|
|
|
: TASKCLUSTER ? 'TaskCluster' |
171
|
|
|
|
|
|
|
: TEAMCITY ? 'TeamCity' |
172
|
|
|
|
|
|
|
: TRAVIS ? 'Travis CI' |
173
|
|
|
|
|
|
|
: undef |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub is_pr () { |
177
|
0
|
|
|
0
|
1
|
|
return exists $ENV{APPVEYOR_PULL_REQUEST_NUMBER} ? 1 : 0 if APPVEYOR; |
178
|
0
|
|
|
|
|
|
return exists $ENV{SYSTEM_PULLREQUEST_PULLREQUESTID} ? 1 : 0 if AZURE_PIPELINES; |
179
|
0
|
|
|
|
|
|
return exists $ENV{BITBUCKET_PR_ID} ? 1 : 0 if BITBUCKET; |
180
|
0
|
|
|
|
|
|
return exists $ENV{BITRISE_PULL_REQUEST} ? 1 : 0 if BITRISE; |
181
|
0
|
|
|
|
|
|
return exists $ENV{BUDDY_EXECUTION_PULL_REQUEST_ID} ? 1 : 0 if BUDDY; |
182
|
0
|
|
|
|
|
|
return exists $ENV{BUILDKITE_PULL_REQUEST} && $ENV{BUILDKITE_PULL_REQUEST} ne 'false' ? 1 : 0 if BUILDKITE; |
183
|
0
|
|
|
|
|
|
return exists $ENV{CIRCLE_PULL_REQUEST} ? 1 : 0 if CIRCLE; |
184
|
0
|
|
|
|
|
|
return exists $ENV{CIRRUS_PR} ? 1 : 0 if CIRRUS; |
185
|
0
|
|
|
|
|
|
return exists $ENV{DRONE_BUILD_EVENT} && $ENV{DRONE_BUILD_EVENT} eq 'pull_request' ? 1 : 0 if DRONE; |
186
|
0
|
|
|
|
|
|
return exists $ENV{GITHUB_EVENT_NAME} && $ENV{GITHUB_EVENT_NAME} eq 'pull_request' ? 1 : 0 if GITHUB_ACTIONS; |
187
|
0
|
|
|
|
|
|
return exists $ENV{ghprbPullId} || exists $ENV{CHANGE_ID} ? 1 : 0 if JENKINS; |
188
|
0
|
|
|
|
|
|
return exists $ENV{PULL_REQUEST} && $ENV{PULL_REQUEST} ne 'false' ? 1 : 0 if NETLIFY; |
189
|
0
|
|
|
|
|
|
return exists $ENV{NEVERCODE_PULL_REQUEST} && $ENV{NEVERCODE_PULL_REQUEST} ne 'false' ? 1 : 0 if NEVERCODE; |
190
|
0
|
|
|
|
|
|
return exists $ENV{SAIL_PULL_REQUEST_NUMBER} ? 1 : 0 if SAIL; |
191
|
0
|
|
|
|
|
|
return exists $ENV{PULL_REQUEST_NUMBER} ? 1 : 0 if SEMAPHORE; |
192
|
0
|
|
|
|
|
|
return exists $ENV{IS_PULL_REQUEST} && $ENV{IS_PULL_REQUEST} eq 'true' ? 1 : 0 if SHIPPABLE; |
193
|
0
|
|
|
|
|
|
return exists $ENV{TDDIUM_PR_ID} ? 1 : 0 if SOLANO; |
194
|
0
|
|
|
|
|
|
return exists $ENV{TRAVIS_PULL_REQUEST} && $ENV{TRAVIS_PULL_REQUEST} ne 'false' ? 1 : 0 if TRAVIS; |
195
|
0
|
|
|
|
|
|
return undef; |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
1; |
199
|
|
|
|
|
|
|
__END__ |