Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81cd5ae092 | ||
|
|
29a9813921 | ||
|
|
f60e7de98e | ||
|
|
b5efb21934 | ||
|
|
26e6a92f3b | ||
|
|
28b68529b5 | ||
|
|
4e4861ec30 | ||
|
|
70169700c3 | ||
|
|
f4e27c9ead | ||
|
|
9855c76987 | ||
|
|
546935924a | ||
|
|
491e9de600 | ||
|
|
e3bda5bed8 | ||
|
|
e70f6d9e7c | ||
|
|
92e992b198 | ||
|
|
99680be1df | ||
|
|
e83e329355 | ||
|
|
10c12b9377 | ||
|
|
91026460e4 | ||
|
|
7fdd3ece87 | ||
|
|
0de5aa9140 | ||
|
|
a6e0b1404f | ||
|
|
5d259c66b1 | ||
|
|
6207829361 | ||
|
|
319feb83c2 | ||
|
|
661ad4bf75 | ||
|
|
04c15e2314 | ||
|
|
5aa416d77b | ||
|
|
a9a661ccd4 | ||
|
|
321f8d7d9a | ||
|
|
7af6c0fe6f | ||
|
|
36e04fc85c | ||
|
|
95916a72b1 | ||
|
|
a5fb328c6a | ||
|
|
72ae4ccbe5 | ||
|
|
5b2015e8fe | ||
|
|
9c77701ae5 | ||
|
|
394503cb8a | ||
|
|
f1cc14e3d5 | ||
|
|
9d529a72e0 | ||
|
|
c63f07d82e | ||
|
|
e40aa32c04 | ||
|
|
a683e80307 | ||
|
|
7ce22e0264 | ||
|
|
4bd44f22a9 | ||
|
|
d2f333de6f | ||
|
|
948bd8df3c | ||
|
|
8cac79fdb1 | ||
|
|
6cc8b47c6f | ||
|
|
0be6fa1958 | ||
|
|
22d9c80367 | ||
|
|
4630172078 | ||
|
|
1b02c009e7 | ||
|
|
12282c9597 | ||
|
|
592bbc7716 | ||
|
|
fb5054b163 | ||
|
|
3f2a402846 | ||
|
|
c5fc0d8281 | ||
|
|
48037d201f | ||
|
|
71b43c4f65 | ||
|
|
3818224063 | ||
|
|
5b29e8a454 | ||
|
|
2a798336a0 | ||
|
|
cb8f453143 | ||
|
|
19323ea920 | ||
|
|
b951cf1d99 | ||
|
|
1fdc5e773b | ||
|
|
1474d67903 | ||
|
|
1afae1868c | ||
|
|
36e33e130a | ||
|
|
3d794ddd93 | ||
|
|
c61bd0e074 | ||
|
|
1f8252a3ed | ||
|
|
3e2462a699 | ||
|
|
e513384a65 | ||
|
|
6483a6ea70 | ||
|
|
ca308a6886 | ||
|
|
035ef490b9 | ||
|
|
6bf279d08a | ||
|
|
bb16550379 | ||
|
|
7d999d501a | ||
|
|
7f8b1e5773 | ||
|
|
6461006ceb | ||
|
|
5f422817a1 | ||
|
|
1b08836381 | ||
|
|
ae98bca05f | ||
|
|
fb1ad7fc84 | ||
|
|
0d60024683 | ||
|
|
1224b29111 | ||
|
|
2f306f9d25 | ||
|
|
39b4e4a983 | ||
|
|
7e46297c8d | ||
|
|
f9390a5478 | ||
|
|
f42145a164 | ||
|
|
755bbb1cc0 | ||
|
|
a36edd3ca4 | ||
|
|
f2018b2189 | ||
|
|
9c411b6e2b | ||
|
|
e8d8aa3403 | ||
|
|
686e8dfff9 | ||
|
|
b46c8e2a8c | ||
|
|
2d47531473 | ||
|
|
fd03521cb4 | ||
|
|
f03add0b41 | ||
|
|
baf9535ba5 | ||
|
|
cc0e576689 | ||
|
|
d30ad8b184 | ||
|
|
0f765070fa | ||
|
|
313d0cfdbf | ||
|
|
cf767706fe | ||
|
|
1267cf80a1 | ||
|
|
7abee8e28c | ||
|
|
dd0115673c | ||
|
|
bbc65d999a | ||
|
|
6db1a06425 | ||
|
|
52eb86c60c | ||
|
|
2b77dd6b79 | ||
|
|
224f9ddef5 | ||
|
|
7f5c8b51ba | ||
|
|
bd5c747191 | ||
|
|
40846b27d0 | ||
|
|
8e2ac35f63 | ||
|
|
a1e6789a94 | ||
|
|
9114b007ae | ||
|
|
cb0c293f02 | ||
|
|
387ec95b46 | ||
|
|
3514d30f93 | ||
|
|
e186e47261 | ||
|
|
e51e662ef0 | ||
|
|
5afd8a1842 | ||
|
|
1a42045d48 | ||
|
|
b3a12ce01e | ||
|
|
04b2ed5b3e | ||
|
|
189e8e6ec0 | ||
|
|
3407e6019c | ||
|
|
f20012026f | ||
|
|
7743b7976f | ||
|
|
b7b50ce742 | ||
|
|
aa9b80f158 | ||
|
|
53adb47562 | ||
|
|
f7d3c00320 | ||
|
|
b359d922e7 | ||
|
|
01aa440f0b | ||
|
|
51f83e019c | ||
|
|
173ca15c9b | ||
|
|
4704ad638a | ||
|
|
1a18b2267f | ||
|
|
e9704839e9 | ||
|
|
5178fac634 | ||
|
|
388883d4bf | ||
|
|
cae6d06e69 | ||
|
|
89f4f7e8be | ||
|
|
d2efbcd126 | ||
|
|
98e3af0bff | ||
|
|
e8836c6d46 | ||
|
|
9068f2e46f | ||
|
|
5bbbd3fdf6 | ||
|
|
7622357ff1 | ||
|
|
6652a09da6 | ||
|
|
48fb8e1194 | ||
|
|
bbc6e9069b | ||
|
|
37dcd1cf8c | ||
|
|
12b1efad4b | ||
|
|
0575a32108 | ||
|
|
71b0e09dbc | ||
|
|
edff21f0a6 | ||
|
|
22035eb75b | ||
|
|
b556cf7292 | ||
|
|
f99a9d4624 | ||
|
|
a49dfe8457 | ||
|
|
7ff9ac44b4 | ||
|
|
7aff4d7a22 | ||
|
|
633321754d | ||
|
|
40a4cb064f | ||
|
|
45410ae8f0 | ||
|
|
56ad5977ba | ||
|
|
6353d20df2 | ||
|
|
e04e1d97f0 | ||
|
|
52685a348b | ||
|
|
44d81f9830 | ||
|
|
401bdecb71 | ||
|
|
aa82ffc68f | ||
|
|
7e03c76ef2 | ||
|
|
16011a795d | ||
|
|
66f24470dc | ||
|
|
e57ea715eb | ||
|
|
e8ba27f3d2 | ||
|
|
945c34c175 | ||
|
|
c8c64c6cf9 | ||
|
|
0d3f92f127 | ||
|
|
4979d5b484 | ||
|
|
0d9a1ba5ae | ||
|
|
3ede7656cb | ||
|
|
f3cdc074ce | ||
|
|
109db648f1 | ||
|
|
3ccc00eece | ||
|
|
0f688a10cb | ||
|
|
3312ea6101 | ||
|
|
ce49f82dd8 | ||
|
|
cf5cd90b4c | ||
|
|
cdb037c2a4 | ||
|
|
261f13a7c5 | ||
|
|
9eaa66d89b | ||
|
|
da9dfe4a71 | ||
|
|
a863ab6d3d | ||
|
|
050cb8061b | ||
|
|
3fda17f3fa | ||
|
|
1a2cb4f872 | ||
|
|
4969814b69 | ||
|
|
07f2ea7d02 | ||
|
|
a1c17b4b18 | ||
|
|
3eda583472 | ||
|
|
74d43be8a3 | ||
|
|
aa1fe473f9 | ||
|
|
a92acf13e4 | ||
|
|
0533892eb4 | ||
|
|
43fb4ad30e | ||
|
|
b88a8c89d1 | ||
|
|
36d7f6c7c5 | ||
|
|
a1a52db9f3 | ||
|
|
88e54b10ca | ||
|
|
203099e007 | ||
|
|
4e9ea33f8d | ||
|
|
68ba5ba947 | ||
|
|
99af32331c | ||
|
|
810a92a9b0 | ||
|
|
9c760dd6e2 | ||
|
|
dea233d702 | ||
|
|
787285e08a | ||
|
|
ee065c5938 | ||
|
|
dbc8ba0844 | ||
|
|
fe9e23a16a | ||
|
|
16de39288a | ||
|
|
67ff09364d | ||
|
|
1dfe0dc4a4 | ||
|
|
6f83b63bf5 | ||
|
|
f0db57dcab | ||
|
|
6cba851606 | ||
|
|
209324abab | ||
|
|
846135c190 | ||
|
|
32d20248ae | ||
|
|
ba8485d89f | ||
|
|
97721a77b9 | ||
|
|
7dfee150df | ||
|
|
251330ef7f | ||
|
|
448bd61c6f | ||
|
|
657e0936e8 | ||
|
|
36d70683e9 | ||
|
|
7a9bf9ecf6 | ||
|
|
5210dd20ed | ||
|
|
e83d1a7f9e | ||
|
|
6ae3564af4 | ||
|
|
9e33c7b24e | ||
|
|
d37cc30485 | ||
|
|
412722b7c7 | ||
|
|
c19f6bbdcd | ||
|
|
dfd2c8da97 | ||
|
|
27eef9a04c | ||
|
|
f172a4dc76 | ||
|
|
c88ece8451 | ||
|
|
33ad931dbb | ||
|
|
4e4b26a024 | ||
|
|
228bfba836 | ||
|
|
34c35ecdad | ||
|
|
1828f05f7a | ||
|
|
927419e77f | ||
|
|
e29242d481 | ||
|
|
035c0a8550 | ||
|
|
e9884d0d9a | ||
|
|
02131e37d9 | ||
|
|
341d29a88f | ||
|
|
5e3bc57de0 | ||
|
|
a826799c7c | ||
|
|
62bd8f3ca4 | ||
|
|
4056d3f353 | ||
|
|
ddf8825c2f | ||
|
|
4678e809c3 | ||
|
|
b75c104ca8 | ||
|
|
94c859a50e | ||
|
|
293da043d1 | ||
|
|
808396c4e6 | ||
|
|
7205f47330 | ||
|
|
7ad352e12a | ||
|
|
5bf95cd61f | ||
|
|
18f3abac75 | ||
|
|
7854a0cae7 | ||
|
|
a72a638da4 | ||
|
|
46c34bb6a5 | ||
|
|
948917a97b | ||
|
|
d9cb143213 | ||
|
|
0cfde7beae | ||
|
|
ce2a129c36 | ||
|
|
78532b17de | ||
|
|
8b26e8d15a | ||
|
|
4dc94c27cf | ||
|
|
76555571a6 | ||
|
|
be43989cc9 | ||
|
|
6f6e534936 | ||
|
|
99a4a141f4 | ||
|
|
c1285cc7f3 | ||
|
|
57662657e0 | ||
|
|
8d4007321f | ||
|
|
8eb9866044 | ||
|
|
e554590514 | ||
|
|
5959fab498 | ||
|
|
408b70728f | ||
|
|
9d74a11420 | ||
|
|
5acd006232 | ||
|
|
0022878947 | ||
|
|
71d07ee7f4 | ||
|
|
8d1c02194f | ||
|
|
5187531b8b | ||
|
|
44ff4ed92d | ||
|
|
96857323bb | ||
|
|
cad2a1bda3 | ||
|
|
c2c73b16c1 | ||
|
|
63c7766312 | ||
|
|
175c9649c4 | ||
|
|
495989aff1 | ||
|
|
c09e310dc1 | ||
|
|
1db2ec93f3 | ||
|
|
0a601ebeee | ||
|
|
da21b560da | ||
|
|
c1efd614e8 | ||
|
|
dcf2f7f74f | ||
|
|
8109be4850 | ||
|
|
a0a791cada | ||
|
|
147905fd60 | ||
|
|
57db6baebb | ||
|
|
c38f1acc38 | ||
|
|
9ca9ab33ef | ||
|
|
fdbb31f707 | ||
|
|
14a9f0b4ae | ||
|
|
2ee6797b63 | ||
|
|
2b729b1130 | ||
|
|
0374a8ae84 | ||
|
|
7f951c9333 | ||
|
|
449da348c0 | ||
|
|
51476af47d | ||
|
|
9a70be75c2 | ||
|
|
282305f4d7 | ||
|
|
c2a765ed5b | ||
|
|
9ea5899759 | ||
|
|
62d47dd238 | ||
|
|
e480353a3d | ||
|
|
3a4acaaed8 | ||
|
|
f7f679181d | ||
|
|
f3010adf3e | ||
|
|
b7cdb2373c | ||
|
|
22ebe0d733 | ||
|
|
cb614c45fa | ||
|
|
e6e79e1717 | ||
|
|
45a631dbaf | ||
|
|
1fd26e45c8 | ||
|
|
de4fdb85b9 | ||
|
|
2fd8046c9d | ||
|
|
d189609ea9 | ||
|
|
3681a25ab6 | ||
|
|
092944b039 | ||
|
|
9e30788903 | ||
|
|
bca2d0b1b0 | ||
|
|
d78b8a6d49 | ||
|
|
da0e854737 | ||
|
|
f24f33ea89 | ||
|
|
7789b4e03e | ||
|
|
75988cd9be | ||
|
|
65341e4a6d | ||
|
|
0f13e29d1f | ||
|
|
5cd765a20d | ||
|
|
deb31af403 | ||
|
|
a6b35b119b | ||
|
|
7dadf1bf21 | ||
|
|
cca8ad3588 | ||
|
|
7117491f1a | ||
|
|
aa1efabe45 | ||
|
|
dab0e73adf | ||
|
|
15b20027cf | ||
|
|
1b4cc0b6fa | ||
|
|
bbba8d75a6 | ||
|
|
a274bd910a | ||
|
|
f4d1db5c23 | ||
|
|
cecf84878d | ||
|
|
be75d5e01d | ||
|
|
cf36ddc55e | ||
|
|
fe438f8e25 | ||
|
|
fdd0a76eca | ||
|
|
7c0b4c8c8e | ||
|
|
b33066473d | ||
|
|
92b4784fb6 | ||
|
|
345999bf0b | ||
|
|
4c5c122aa6 | ||
|
|
bee5abe269 | ||
|
|
220d0c24c7 | ||
|
|
2f5c2edb22 | ||
|
|
721e4c3367 | ||
|
|
2f2a90e464 | ||
|
|
81a06ff6ed | ||
|
|
dfc02c42d9 | ||
|
|
ac7d3d7f84 | ||
|
|
874e5099b0 | ||
|
|
4a3337d069 | ||
|
|
123f6df529 | ||
|
|
341cf69e13 | ||
|
|
f7b503e36b | ||
|
|
beaceb0089 | ||
|
|
03509eca9b | ||
|
|
2c9c274411 | ||
|
|
1c85db7f9e | ||
|
|
d259dd49a2 | ||
|
|
ea20ae1fbd | ||
|
|
383c74bb06 | ||
|
|
b4593b7df0 | ||
|
|
9b92c9db92 | ||
|
|
a357b6a054 | ||
|
|
0bc2f7ce96 | ||
|
|
e2e76ea34f | ||
|
|
719018955c | ||
|
|
4c903565c9 | ||
|
|
fc60088a95 | ||
|
|
a7f90656b3 | ||
|
|
0cd4af837e | ||
|
|
96e47f9be7 | ||
|
|
eca40cad4d | ||
|
|
4e864eae3b | ||
|
|
49a0bad962 | ||
|
|
b971d8f4ad | ||
|
|
fca0924fa9 | ||
|
|
8dfe214356 | ||
|
|
f2d6820ca2 | ||
|
|
705c2a5785 | ||
|
|
5e33fdb0d9 | ||
|
|
dab978c436 | ||
|
|
2cc925b655 | ||
|
|
4ce6f3c3df | ||
|
|
b3bf0f3990 | ||
|
|
8426bf89fd | ||
|
|
d7c3e33a96 | ||
|
|
17ef667e04 | ||
|
|
295b5da700 | ||
|
|
e820a5d75b | ||
|
|
2c8682d5e6 | ||
|
|
87993cd853 | ||
|
|
e0dd9c9560 | ||
|
|
28853c9f3b | ||
|
|
608ad1a0cf | ||
|
|
257e4c088d | ||
|
|
7b145b5fae | ||
|
|
253459691c | ||
|
|
cb5db3f888 | ||
|
|
52d2b3b70b | ||
|
|
fa5fbefff9 | ||
|
|
256b466cc4 | ||
|
|
57f4a60e24 | ||
|
|
2e289f30e2 | ||
|
|
bc0d607611 | ||
|
|
1fa3ba1b16 | ||
|
|
d8d1da5d6d | ||
|
|
094bc8ae17 | ||
|
|
48aac87d46 | ||
|
|
31971c78cd | ||
|
|
13760f5b16 | ||
|
|
c644f654ce | ||
|
|
9adda12e86 | ||
|
|
6db8a6c378 | ||
|
|
a34eeedd37 | ||
|
|
35bc046b26 | ||
|
|
64e9bb0e79 | ||
|
|
19a01870e7 | ||
|
|
c4560dd084 | ||
|
|
0313f578ce | ||
|
|
d068c17d9e | ||
|
|
8eebeae48a | ||
|
|
da9dadf09c | ||
|
|
e06e40278f | ||
|
|
6473b1c04c | ||
|
|
7694412cb0 | ||
|
|
e990e98a54 | ||
|
|
b2d037d560 | ||
|
|
4beeea41b4 | ||
|
|
8e80635955 | ||
|
|
c8837583fc | ||
|
|
bb36513e49 | ||
|
|
5402397d9f | ||
|
|
f6b4601c63 | ||
|
|
ed62711289 | ||
|
|
2cb9b82943 | ||
|
|
4f420be5bd | ||
|
|
cf40c1e950 | ||
|
|
91936faf85 | ||
|
|
ca319bd10e | ||
|
|
4d3cfaa653 | ||
|
|
c8b716540c | ||
|
|
1cecc2cc99 | ||
|
|
5137c78ee5 | ||
|
|
c37021df01 | ||
|
|
c6e99860cd | ||
|
|
05b4ac2afb | ||
|
|
91bd11146c | ||
|
|
8ace7bdc6e | ||
|
|
4bb4f1812c | ||
|
|
7bd9f10bef | ||
|
|
0b38e86c65 | ||
|
|
b717b2fcde | ||
|
|
216d501175 | ||
|
|
c2e811ce23 | ||
|
|
dbf50bf9e0 | ||
|
|
947009a717 | ||
|
|
ca910e5511 | ||
|
|
f31d416e6e | ||
|
|
36cb9fb0fc | ||
|
|
6a8a2abd3c | ||
|
|
c88f07696b | ||
|
|
0b33ef444f | ||
|
|
604ffba8e1 | ||
|
|
a3727c20a4 | ||
|
|
6a9b0017a4 | ||
|
|
3b2ce6cae6 | ||
|
|
c61b9256d1 | ||
|
|
09e08a3554 | ||
|
|
f31bef6a30 | ||
|
|
1a216636c5 | ||
|
|
7eec3d790d | ||
|
|
5afed16e5f | ||
|
|
14fa980966 | ||
|
|
39491a0fba | ||
|
|
c6b6dabbb9 | ||
|
|
e1a9afe11c | ||
|
|
6449431df2 | ||
|
|
60ff774608 | ||
|
|
dd591f1661 | ||
|
|
fefbd7a497 | ||
|
|
10f1a63300 | ||
|
|
a06325cfba | ||
|
|
e0b7f34ba7 | ||
|
|
e02a1810e6 | ||
|
|
55ab748aaa | ||
|
|
bb0acc6313 | ||
|
|
17fd1a694b | ||
|
|
454ef11759 | ||
|
|
e3396c6572 | ||
|
|
3beda962f3 | ||
|
|
1f97ce0215 | ||
|
|
00f360b99d | ||
|
|
9882bed066 | ||
|
|
e8855efe7c | ||
|
|
4067ce8b81 | ||
|
|
d5790807c8 | ||
|
|
ed61605069 | ||
|
|
d0e7f46ec4 | ||
|
|
ef477a1dd7 | ||
|
|
9149639a33 | ||
|
|
2fdb2200a0 | ||
|
|
15c43e89cd | ||
|
|
b0559f7f8e | ||
|
|
a41bc75590 | ||
|
|
6ebd1e5184 | ||
|
|
9ad81048ce | ||
|
|
8cfcbb030f | ||
|
|
254ecd5a66 | ||
|
|
0461bf14b2 | ||
|
|
7e5351f399 | ||
|
|
fe944a16b5 | ||
|
|
909090903e | ||
|
|
75a1b03f39 | ||
|
|
a47644812e | ||
|
|
23393c46d7 | ||
|
|
3c6827c2c3 | ||
|
|
de8537f42a | ||
|
|
ada1ce86b7 | ||
|
|
7c13389546 | ||
|
|
7627a79c01 | ||
|
|
39faaac1d3 | ||
|
|
b3152daa8d | ||
|
|
6db6ddbab2 | ||
|
|
c870bc9a3a | ||
|
|
f5f14c3aa3 | ||
|
|
e831babc61 | ||
|
|
c7736a605a | ||
|
|
a9a6d1986e | ||
|
|
c342ca379e | ||
|
|
cc316409b0 | ||
|
|
a8dafdc2b5 | ||
|
|
f8646352c6 | ||
|
|
3cbec713b8 | ||
|
|
4186db28f7 | ||
|
|
18f02c9c99 | ||
|
|
15b99e2a8d | ||
|
|
e9a7adef28 | ||
|
|
bceb2ef3d8 | ||
|
|
86e7315da6 | ||
|
|
0741f2b23a | ||
|
|
0c4c4d5441 | ||
|
|
abfbe6a46b | ||
|
|
62aa8428dd | ||
|
|
e6a3eb1258 | ||
|
|
0ce7328fd7 | ||
|
|
6e76d3f012 | ||
|
|
ac40fdb561 | ||
|
|
890ea4bca9 | ||
|
|
113fcc64e3 | ||
|
|
afefcaf556 | ||
|
|
df4388ca60 | ||
|
|
fa18c2b29f | ||
|
|
399ab79d14 | ||
|
|
9601a19811 | ||
|
|
60ff151fc1 | ||
|
|
121cb19a65 | ||
|
|
739ccacdc4 | ||
|
|
cff0bdeaa3 | ||
|
|
70d858dd49 | ||
|
|
3340d60d91 | ||
|
|
57c17e3349 | ||
|
|
356e1a5128 | ||
|
|
633920d001 | ||
|
|
406f3c410a | ||
|
|
17349dafc1 | ||
|
|
962f570776 | ||
|
|
f66ac5d5a6 | ||
|
|
3f466981fc | ||
|
|
fd62612e9e | ||
|
|
26791e8412 | ||
|
|
f42065d568 | ||
|
|
912f27c42c | ||
|
|
86e1ccdd8d | ||
|
|
36ec0200a6 | ||
|
|
1686147b24 | ||
|
|
ecc8611061 | ||
|
|
abefdb50ee | ||
|
|
2ea6ca5b36 | ||
|
|
a83d4379b1 | ||
|
|
fbc8407035 | ||
|
|
6972aed899 | ||
|
|
d2f58713aa | ||
|
|
068c794af7 | ||
|
|
1e119b6d1a | ||
|
|
77721f6637 | ||
|
|
d731e56579 | ||
|
|
e5b90e33c6 | ||
|
|
849315646a | ||
|
|
d891a81b7f | ||
|
|
5098017251 | ||
|
|
2da85f306f | ||
|
|
1f94ad201f | ||
|
|
862f206cd2 | ||
|
|
81964ae791 | ||
|
|
b7d1d9c9a9 | ||
|
|
c5e4d55c3b | ||
|
|
d74064b67a | ||
|
|
8862a73fdd | ||
|
|
7b44f7e007 | ||
|
|
ff5499165a | ||
|
|
b3cd6b4dab | ||
|
|
ce02569aea | ||
|
|
f1c04eb1eb | ||
|
|
77aeac1761 | ||
|
|
569522d50d | ||
|
|
ea8be20255 | ||
|
|
d6f700217a | ||
|
|
1015b3659d | ||
|
|
03359ef1ab | ||
|
|
fd9aae59b0 | ||
|
|
9af1e7006f | ||
|
|
5efdcae81a | ||
|
|
f0fb8731a5 | ||
|
|
5a15252e66 | ||
|
|
c0c6e403b6 | ||
|
|
d0677c93b9 | ||
|
|
466908db61 | ||
|
|
8dbd6b7684 | ||
|
|
5a40a5875d | ||
|
|
790a41a722 | ||
|
|
62c7ba2bee | ||
|
|
41797e3af9 | ||
|
|
c6150c6a2b | ||
|
|
19b09596c6 | ||
|
|
4ec398d39a | ||
|
|
6bbaac9c49 | ||
|
|
012f269570 | ||
|
|
09222f42ae | ||
|
|
403191b6b6 | ||
|
|
02cba443ad | ||
|
|
31fa0d7883 | ||
|
|
f9caa0457d | ||
|
|
248394635c | ||
|
|
a094f682be | ||
|
|
45213ad923 | ||
|
|
385e3b6e96 | ||
|
|
5453c1f4f0 | ||
|
|
787c534f64 | ||
|
|
d812e938ac | ||
|
|
7de94e6400 | ||
|
|
68fbd80105 | ||
|
|
02445f719d | ||
|
|
215b040f0d | ||
|
|
925ede2589 | ||
|
|
d1510a82d5 | ||
|
|
808e74aed5 | ||
|
|
f51d00d350 | ||
|
|
c8111b053c | ||
|
|
294f03454a | ||
|
|
5d27b8f90e | ||
|
|
87e62cbb7f | ||
|
|
2c29e8b9a1 | ||
|
|
04a9e3b562 | ||
|
|
4adaa73d25 | ||
|
|
234594684c | ||
|
|
3c0527bec1 | ||
|
|
c5d41cd3f1 | ||
|
|
601cabfd2a | ||
|
|
81c750c6d7 | ||
|
|
0661130e18 | ||
|
|
4244b92ac6 | ||
|
|
e9595da9ac | ||
|
|
b77ec78d01 | ||
|
|
96d8c1e901 | ||
|
|
8816b6ff48 | ||
|
|
9205a596c9 | ||
|
|
6fc20c9b7f | ||
|
|
eb07280d5c | ||
|
|
eaaab1cec3 | ||
|
|
853381d0bb | ||
|
|
1394617d60 | ||
|
|
093498a0a1 | ||
|
|
d2241010ef | ||
|
|
a0f02c17c0 | ||
|
|
bb5257e07d | ||
|
|
f687ff8f21 | ||
|
|
537c66b2ea | ||
|
|
073c2e666b | ||
|
|
465e63b28c | ||
|
|
b8f0b066dc | ||
|
|
9e663851ce | ||
|
|
ad196941ed | ||
|
|
f8e867a9ff | ||
|
|
8cb01730c7 | ||
|
|
ebba1db2c3 | ||
|
|
716331904e | ||
|
|
2ad63ddbd3 | ||
|
|
c4606c9269 | ||
|
|
7dcb43c768 | ||
|
|
691c5309aa | ||
|
|
84b222366a | ||
|
|
b98ed88402 | ||
|
|
0ca827ae3b | ||
|
|
16b0a25bf6 | ||
|
|
fa0af5c382 | ||
|
|
db36b200b1 | ||
|
|
7cfd76cc1b | ||
|
|
682b1f5e44 | ||
|
|
7b56e4491e | ||
|
|
acc1fdb337 | ||
|
|
e3286d1234 | ||
|
|
83019fade2 | ||
|
|
83b3d4a8f9 | ||
|
|
56273e234f | ||
|
|
48a00b4d3f | ||
|
|
f641885a8d | ||
|
|
9457ce6e2b | ||
|
|
a31f8b1a2b | ||
|
|
ffded4a3e8 | ||
|
|
9e6b9d7d70 | ||
|
|
7d45057bba | ||
|
|
c4fd8b0739 | ||
|
|
49088ede98 | ||
|
|
3543ed1ef8 | ||
|
|
9bd0fdbc18 | ||
|
|
c5d29cf8e3 | ||
|
|
c5e0997b44 | ||
|
|
ee084d3176 | ||
|
|
c256f0c9cb | ||
|
|
d84365cd03 | ||
|
|
3c52e818b1 | ||
|
|
188598ef9d | ||
|
|
f8b8d766d5 | ||
|
|
15a6402865 | ||
|
|
91bd6b26c2 | ||
|
|
9dae796baf | ||
|
|
6d9aef83a3 | ||
|
|
bd5a0d94b6 | ||
|
|
5405f14867 | ||
|
|
cb25b9c13a | ||
|
|
e63d25d41f | ||
|
|
2a7ae24c8e | ||
|
|
e68a74a71c | ||
|
|
67152eb712 | ||
|
|
83bdf158fa | ||
|
|
5e240ab99f | ||
|
|
0fae072f07 | ||
|
|
e0561697dc | ||
|
|
3aa0f17b55 | ||
|
|
8b218279a3 | ||
|
|
90b6355bf0 | ||
|
|
84f23853b7 | ||
|
|
a4001afbd6 | ||
|
|
cfbb105cb6 | ||
|
|
c549015370 | ||
|
|
9e22b87414 | ||
|
|
7961bc11b1 | ||
|
|
87f807365d | ||
|
|
25d9bbc737 | ||
|
|
d2f865c91a | ||
|
|
a13373a271 | ||
|
|
a764546381 | ||
|
|
380b68048b | ||
|
|
4dcf9cd2ab | ||
|
|
f3641e0c33 | ||
|
|
d35633ec7a | ||
|
|
7eea3d82f6 | ||
|
|
57ecdba082 | ||
|
|
db03758c66 | ||
|
|
82837572d4 | ||
|
|
8efcf46b31 | ||
|
|
4391cf8a4c | ||
|
|
87a69f94d9 | ||
|
|
c12fad850b | ||
|
|
47b8d68850 | ||
|
|
530929f741 | ||
|
|
a965723128 | ||
|
|
9845a63f5c | ||
|
|
4af7e96d03 | ||
|
|
13a3d9d0a9 | ||
|
|
9d042b2683 | ||
|
|
7a59874419 | ||
|
|
8dee767b82 | ||
|
|
5fc5a95363 | ||
|
|
8ba779d78e | ||
|
|
04376074d2 | ||
|
|
262202d43f | ||
|
|
f64dddeeb4 | ||
|
|
1d50c4a8cd | ||
|
|
d313593fee | ||
|
|
5753a00ef5 | ||
|
|
38731c6386 | ||
|
|
9f400a0dfd | ||
|
|
ba020e3463 | ||
|
|
c0d425d939 | ||
|
|
4752a51595 | ||
|
|
10608f5908 | ||
|
|
d01ec214f2 | ||
|
|
6158538131 | ||
|
|
dd27d4eb81 | ||
|
|
248d04f73c | ||
|
|
c5e40d9067 | ||
|
|
e0ed1ad0ef | ||
|
|
2907f8a584 | ||
|
|
52691651dc | ||
|
|
b9404683e1 | ||
|
|
70954fb6f8 | ||
|
|
65e65163cd | ||
|
|
41397ce45e | ||
|
|
c09954033f | ||
|
|
7cec1987ac | ||
|
|
739e40fb5e | ||
|
|
9dec5892e7 | ||
|
|
94616818f0 | ||
|
|
4f0d9003dc | ||
|
|
b2edfc47dd | ||
|
|
6bd872ad2c | ||
|
|
03eb8cc744 | ||
|
|
9687dd1d8a | ||
|
|
2df0d2b443 | ||
|
|
0e56c0b653 | ||
|
|
0469a6f681 | ||
|
|
325413a824 | ||
|
|
b84dd3ce25 | ||
|
|
190220c10d | ||
|
|
4fb049a68b | ||
|
|
3e0678b50f | ||
|
|
5b06192e7c | ||
|
|
b419442896 | ||
|
|
49b8b7e301 | ||
|
|
b1776b79c8 | ||
|
|
a48ff666f8 | ||
|
|
3bffbad95a | ||
|
|
18041fdab5 | ||
|
|
b36d2222e6 | ||
|
|
50ffa593bb | ||
|
|
6cbc46fdb6 | ||
|
|
08c60fceea | ||
|
|
c30a9630bb | ||
|
|
0158fe2782 | ||
|
|
3a8557bcc6 | ||
|
|
d10d1e249b | ||
|
|
3ec1728de8 | ||
|
|
9c266d4158 | ||
|
|
0135ee2ed1 | ||
|
|
5c2618165a | ||
|
|
8123132b99 | ||
|
|
f5863fd356 | ||
|
|
cf0fdf35f2 | ||
|
|
8830cdd08c | ||
|
|
4960e3179f | ||
|
|
0f3f604249 | ||
|
|
5915f05b06 | ||
|
|
dccdb5ab67 | ||
|
|
9a01fd28ca | ||
|
|
d5cd6a4bd1 | ||
|
|
006301e81d | ||
|
|
4a38014043 | ||
|
|
a0ac655b06 | ||
|
|
41e56c42c7 | ||
|
|
4e8a0cfe8b | ||
|
|
ee72f2f8ad | ||
|
|
ed557fd2c3 | ||
|
|
d90cd153ee | ||
|
|
3376371dd8 | ||
|
|
a2b261d79a | ||
|
|
6c93dbd391 | ||
|
|
f58dc6eca1 | ||
|
|
5326f2302f | ||
|
|
b9a78a31fb | ||
|
|
ba69b25cab | ||
|
|
a6533acdd4 | ||
|
|
d3b37e3d0d | ||
|
|
f3a1262ff6 | ||
|
|
933abd531a | ||
|
|
67ed7f234b | ||
|
|
f90accffb3 | ||
|
|
93441b70bf | ||
|
|
67f23b6380 | ||
|
|
2937ad6e7a | ||
|
|
a5e5d07fcb | ||
|
|
30d8b321f4 | ||
|
|
405e57e429 | ||
|
|
58f376b118 | ||
|
|
b7d68d8225 | ||
|
|
9252820289 | ||
|
|
a5cc9fab25 | ||
|
|
4e5685a75d | ||
|
|
d475227ba5 | ||
|
|
38cb8b924d | ||
|
|
fdd83e94df | ||
|
|
ad112b7981 | ||
|
|
2b0d6e221f | ||
|
|
acee5b203f | ||
|
|
84e88e382f | ||
|
|
bbdc4e3b67 | ||
|
|
311eb9f3ba | ||
|
|
3dfd7a648b | ||
|
|
943f491830 | ||
|
|
dc9461a053 | ||
|
|
f2720d7b82 | ||
|
|
99161b7790 | ||
|
|
5de6285e1f | ||
|
|
14d702e830 | ||
|
|
9539b27b4a | ||
|
|
a4f7326577 | ||
|
|
9b297384e1 | ||
|
|
9d77946f60 | ||
|
|
6d21e6dc05 | ||
|
|
68c827cfcf | ||
|
|
d95ca49e8d | ||
|
|
03fd0b8719 | ||
|
|
ebe1c12c21 | ||
|
|
b46021d870 | ||
|
|
64ba54fc1b | ||
|
|
71571f685a | ||
|
|
10f86cb1a1 | ||
|
|
0f694c5087 | ||
|
|
9dfebd1adb | ||
|
|
3781acab4b | ||
|
|
cdfbf6d0f0 | ||
|
|
0ccb02802f | ||
|
|
a4572586dc | ||
|
|
cb3c752d1f | ||
|
|
383a511d0e | ||
|
|
cc55dbcaa8 | ||
|
|
e644692ccf | ||
|
|
96d5358317 | ||
|
|
3a473c9a22 | ||
|
|
40944de129 | ||
|
|
f9202d6b64 | ||
|
|
d99c8732ba | ||
|
|
2c559eae3d | ||
|
|
3a2ca44a8a | ||
|
|
17241e2689 | ||
|
|
ca33d01e9f | ||
|
|
3c6644f237 | ||
|
|
326dfd1e76 | ||
|
|
d9cf6f5ad6 | ||
|
|
ea50c7c0a2 | ||
|
|
6ca549dcaa | ||
|
|
d3760be2cc | ||
|
|
3454287b87 | ||
|
|
88c7757dc8 | ||
|
|
48cfea3f3e | ||
|
|
43cfa2b1a8 | ||
|
|
76cecacc5e | ||
|
|
d6e173ffc6 | ||
|
|
26701f2ec8 | ||
|
|
e934fe28b8 | ||
|
|
d384d9fe7e | ||
|
|
4eeaf5f99e | ||
|
|
fd2392db56 | ||
|
|
494dde7189 | ||
|
|
706dfca1e6 | ||
|
|
d613c975f6 | ||
|
|
fbe1419ce4 | ||
|
|
c844c7b6e4 | ||
|
|
8e5cc09df9 | ||
|
|
f4f8aec1f2 | ||
|
|
b44b7344e0 | ||
|
|
e01b2f0bf7 | ||
|
|
f7f8ecb931 | ||
|
|
4f0d810cbc | ||
|
|
47335179aa | ||
|
|
63c4aea452 | ||
|
|
898b6fa1f9 | ||
|
|
747c8838bc | ||
|
|
9d6b61c5af | ||
|
|
5108c81610 | ||
|
|
e58c704985 | ||
|
|
e9c783eef0 | ||
|
|
b44e5e009f | ||
|
|
8489dbf4de | ||
|
|
f23ae2e6f7 | ||
|
|
d2b233e45f | ||
|
|
320474a245 | ||
|
|
65ccfb36dc | ||
|
|
88fb99b592 | ||
|
|
9e7bc5c91f | ||
|
|
ca2f547a35 | ||
|
|
9f21c80d24 | ||
|
|
c4317135df | ||
|
|
a2dd688679 | ||
|
|
bd214a2dca | ||
|
|
2ee4653d1c | ||
|
|
0b3e0f451d | ||
|
|
0bfa897634 | ||
|
|
71db1e2cf1 | ||
|
|
16d1cd4766 | ||
|
|
1193cd100b | ||
|
|
e839a77d8c | ||
|
|
552df3f2b0 | ||
|
|
3109c941eb | ||
|
|
aa8706a5bf | ||
|
|
9afdee42e8 | ||
|
|
aa0e9403d8 | ||
|
|
5b00f068f3 | ||
|
|
8f39d3eddd | ||
|
|
9d87d1fd14 | ||
|
|
07ae2343d0 | ||
|
|
7b8bf7af6a | ||
|
|
0ac6f76d36 | ||
|
|
6c6203b683 | ||
|
|
0c9f8a8e7e | ||
|
|
1705daea72 | ||
|
|
58fbc33c3a | ||
|
|
3f42b7d5fb | ||
|
|
dd4f0db7bf | ||
|
|
7d026bfa6b | ||
|
|
6a70f864ec | ||
|
|
8e1cde2d0a | ||
|
|
de32d8b95f | ||
|
|
273096b82f | ||
|
|
4c045616f4 | ||
|
|
935e74fb40 | ||
|
|
a507be73b5 | ||
|
|
673dcaff6d | ||
|
|
2cbfd4fb41 | ||
|
|
0969980399 | ||
|
|
1fa2905bc6 | ||
|
|
790a48c30d | ||
|
|
4b69160eff | ||
|
|
7f805f22af | ||
|
|
f2972dcf18 | ||
|
|
2d488f53fd | ||
|
|
421187c870 | ||
|
|
1798f4d615 | ||
|
|
8039546df3 | ||
|
|
c6ad3d1a70 | ||
|
|
922f1e27b8 | ||
|
|
2d3750b36e | ||
|
|
51c7527bd8 | ||
|
|
2bf7ab0207 | ||
|
|
b3a84fc51e | ||
|
|
1330950cd5 | ||
|
|
afb57fca4e | ||
|
|
50344f4883 | ||
|
|
2b027bd9bc | ||
|
|
8f8207a1ca | ||
|
|
87e6c70743 | ||
|
|
e3d18718a9 | ||
|
|
cfa7bc51cd | ||
|
|
ade633f0da | ||
|
|
2cabcf2941 | ||
|
|
9ce4bd6f1b | ||
|
|
190ae49ac1 | ||
|
|
032bc86056 | ||
|
|
704c5180a4 | ||
|
|
e4fc767f9c | ||
|
|
1cf6a369bb | ||
|
|
14acb26bdc | ||
|
|
3ff7f9cedc | ||
|
|
98e937751c | ||
|
|
31b338b199 | ||
|
|
9e32964a24 | ||
|
|
4dcf2b117f | ||
|
|
6d8250310d | ||
|
|
3164116a42 | ||
|
|
747d45cb52 | ||
|
|
4b7ad1ca81 | ||
|
|
31ef16e586 | ||
|
|
dd1def7620 | ||
|
|
693a73d8da | ||
|
|
965eb91efd | ||
|
|
db9f610623 | ||
|
|
24fb306a50 | ||
|
|
919fe77b43 | ||
|
|
914c51cfb6 | ||
|
|
8d8c2bd524 | ||
|
|
7ef437ee9d | ||
|
|
0871fbb11b | ||
|
|
3039a720ed | ||
|
|
7f32ab318e | ||
|
|
ddcacf4760 | ||
|
|
2f951ef5cd | ||
|
|
5a081357b4 | ||
|
|
c4a64dff61 | ||
|
|
aad33a8e35 | ||
|
|
eae890b1b2 | ||
|
|
8fbd2ea6bb | ||
|
|
46161660dc | ||
|
|
de68427afb | ||
|
|
4ba36c5432 | ||
|
|
99e2d8d309 | ||
|
|
929f9cd52d | ||
|
|
4dba50d3af | ||
|
|
1c258f399f | ||
|
|
e05bc317ec | ||
|
|
44815f1f73 | ||
|
|
22f5ad47d2 | ||
|
|
a29956826a | ||
|
|
c11d023c03 | ||
|
|
cade5f7157 | ||
|
|
7964656607 | ||
|
|
970e2d5ebb | ||
|
|
5b09e1195e | ||
|
|
6fdecd40be | ||
|
|
159a09794e | ||
|
|
0be846de83 | ||
|
|
981c662f5d | ||
|
|
71c631cffb | ||
|
|
47387dd6e9 | ||
|
|
fec9df11d6 | ||
|
|
03f36220f4 | ||
|
|
1db0b0651d | ||
|
|
3f6c88dec7 | ||
|
|
2b938d931a | ||
|
|
71bd88f604 | ||
|
|
242082a22f | ||
|
|
b9db11a072 | ||
|
|
f381d2384c | ||
|
|
63d8fa1a9e | ||
|
|
dd1c34be39 | ||
|
|
1eb8e8f5cd | ||
|
|
0000679cbb | ||
|
|
7c5f2ab8e9 | ||
|
|
9d5e8ddc70 | ||
|
|
77bc79bd22 | ||
|
|
02c5ec11cc | ||
|
|
d2e09be6ce | ||
|
|
013ddc75a3 | ||
|
|
25abc4c776 | ||
|
|
4000f65b59 | ||
|
|
e14155415a | ||
|
|
9f16995a6f | ||
|
|
24ecbee4ea | ||
|
|
c71102b8a0 | ||
|
|
0815f5a8bb | ||
|
|
e5076cee70 | ||
|
|
bd85a2a227 | ||
|
|
976fb6996a | ||
|
|
06e916db9d | ||
|
|
46ac6f2211 | ||
|
|
47d1da0476 | ||
|
|
dfabf8ce29 | ||
|
|
9304663cff | ||
|
|
878561f9a8 | ||
|
|
9550c7aa45 | ||
|
|
ebeb82f894 | ||
|
|
aa2af38672 | ||
|
|
d27b4a7bc7 | ||
|
|
aeb5831c32 | ||
|
|
cb5e07baff | ||
|
|
9469267fb3 | ||
|
|
1d6dab3cd1 | ||
|
|
20d1b1c6f1 | ||
|
|
0d8d5d2f2c | ||
|
|
16267e1982 | ||
|
|
91d14c7068 | ||
|
|
340ab0b95f | ||
|
|
75c0e130e8 | ||
|
|
57a0907a18 | ||
|
|
3315fa09dc | ||
|
|
b132b4eb7c | ||
|
|
9145972d5c | ||
|
|
0ac43c03b2 | ||
|
|
46f009cce1 | ||
|
|
8d9a12ba84 | ||
|
|
76e0150bb5 | ||
|
|
ffc5b0249d | ||
|
|
a6aaa1db78 | ||
|
|
62beed29e3 | ||
|
|
fce9311522 | ||
|
|
b2e7a49dd5 | ||
|
|
99bbaa2a58 | ||
|
|
f7f5b1a7e1 | ||
|
|
e755fb7a69 | ||
|
|
3087ceb811 | ||
|
|
05e2b0d1e9 | ||
|
|
dd5c977988 | ||
|
|
c1c0acc338 | ||
|
|
409e055931 | ||
|
|
46a875ad7e | ||
|
|
7e81c058fb | ||
|
|
754ab9515b | ||
|
|
f866c880c2 | ||
|
|
eb21cb8fb3 | ||
|
|
aee6b953c3 | ||
|
|
21c3c8db47 | ||
|
|
c0e0d9d98e | ||
|
|
5ab8ec4a99 | ||
|
|
ec3c220bb2 | ||
|
|
17d90ace86 | ||
|
|
ba5306eea9 | ||
|
|
06929bdf4c | ||
|
|
e97e822eff | ||
|
|
0f97f445fb | ||
|
|
507cc5e95d | ||
|
|
2a30f9d208 | ||
|
|
eaf140ca8b | ||
|
|
dcd432d918 | ||
|
|
91a03a2865 | ||
|
|
ca33947c62 | ||
|
|
932b66f3fc | ||
|
|
651d2619bb | ||
|
|
16f13a69eb | ||
|
|
9134867822 | ||
|
|
36104f0983 | ||
|
|
a0b0e58cb3 | ||
|
|
c6f956927a | ||
|
|
83cc9a4bcf | ||
|
|
e63fd8e122 | ||
|
|
d33e2e06e4 | ||
|
|
7fcf39f8e9 | ||
|
|
43a64813f3 | ||
|
|
ba83ab2e67 | ||
|
|
9cfe4e665e | ||
|
|
585f7a1fd2 | ||
|
|
43178a7254 | ||
|
|
db44db4b97 | ||
|
|
601f50f55e | ||
|
|
e71c06a64f | ||
|
|
c5825452ec | ||
|
|
339c69c9a5 | ||
|
|
e4a37d0f16 | ||
|
|
a398f54da4 | ||
|
|
69f9b777e1 | ||
|
|
02867faba4 | ||
|
|
35b0788556 | ||
|
|
2484a27666 | ||
|
|
42de8649eb | ||
|
|
f6674883c6 | ||
|
|
738fa3dfee | ||
|
|
9616296853 | ||
|
|
b45c80e26a | ||
|
|
764f8c8453 | ||
|
|
c5513d9a78 | ||
|
|
1c6748567c | ||
|
|
76bcc07458 | ||
|
|
8ba904fa24 | ||
|
|
13824286db | ||
|
|
e5083c779b | ||
|
|
2f94ea1a79 |
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"env": { "node": true, "jest": true },
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": { "ecmaVersion": 2021, "sourceType": "module" },
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:import/errors",
|
||||||
|
"plugin:import/warnings",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
"plugin:prettier/recommended",
|
||||||
|
"prettier"
|
||||||
|
],
|
||||||
|
"plugins": ["@typescript-eslint", "jest"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team at contact@shivammathur.com. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see
|
||||||
|
https://www.contributor-covenant.org/faq
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
# Contributing to setup-php
|
||||||
|
|
||||||
|
## Welcome!
|
||||||
|
|
||||||
|
We look forward to your contributions! Here are some examples how you can contribute:
|
||||||
|
|
||||||
|
* [Ask any questions you may have](https://github.com/shivammathur/setup-php/discussions/new?category=Q-A-Help)
|
||||||
|
* [Report a bug](https://github.com/shivammathur/setup-php/issues/new?labels=type/bug&template=bug.md)
|
||||||
|
* [Propose a new feature](https://github.com/shivammathur/setup-php/issues/new?labels=enhancement&template=feature.md)
|
||||||
|
* [Send a pull request](https://github.com/shivammathur/setup-php/pulls)
|
||||||
|
|
||||||
|
## Contributor Code of Conduct
|
||||||
|
|
||||||
|
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
To get started fork `setup-php` and clone it using git:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/<your-username>/setup-php.git
|
||||||
|
|
||||||
|
cd setup-php
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are using `Windows` configure `git` to handle line endings.
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
git config --local core.autocrlf true
|
||||||
|
```
|
||||||
|
|
||||||
|
Install `setup-php` dependencies using [npm](https://www.npmjs.com/):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Workflow to create Pull Requests
|
||||||
|
|
||||||
|
* Fork the `setup-php` project and clone it.
|
||||||
|
* Create a new branch from the develop branch.
|
||||||
|
* Make your bug fix or feature addition.
|
||||||
|
* Add tests for it, so we don't break it in a future version unintentionally.
|
||||||
|
* Ensure the test suite passes and the code complies with our coding guidelines (see below).
|
||||||
|
* Send a pull request to the develop branch with all the details.
|
||||||
|
* If possible, create a GitHub Actions workflow with an integration test for the change in a demo repository and link it in your pull request.
|
||||||
|
|
||||||
|
Please make sure that you have [set up your user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name <root@localhost>` look really stupid in the commit history of a project.
|
||||||
|
|
||||||
|
Due to time constraints, you may not always get a quick response. Please do not take delays personally and feel free to remind.
|
||||||
|
|
||||||
|
## Coding Guidelines
|
||||||
|
|
||||||
|
This project comes with `.prettierrc.json` and `eslintrc.json` configuration files. Please run the following commands to fix and verify the code quality.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run format
|
||||||
|
npm run lint
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running the test suite
|
||||||
|
|
||||||
|
After following the steps shown above, The `setup-php` tests in the `__tests__` directory can be run using this command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm test
|
||||||
|
```
|
||||||
|
|
||||||
|
### Creating a release
|
||||||
|
|
||||||
|
Creating a release means compiling all the TypeScript code to a single file which `setup-php` can run. Run this, before you push your changes.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
npm run release
|
||||||
|
```
|
||||||
|
|
||||||
|
### Reporting issues and discussions
|
||||||
|
|
||||||
|
For questions or support, we prefer GitHub Discussions. For any bugs or new features you can create an issue using the appropriate template:
|
||||||
|
|
||||||
|
* [Discussions](https://github.com/shivammathur/setup-php/discussions)
|
||||||
|
* [Issues](https://github.com/shivammathur/setup-php/issues)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: shivammathur
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Nice, you found a bug!
|
||||||
|
title: ''
|
||||||
|
labels: 'bug'
|
||||||
|
assignees: 'shivammathur'
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
<!-- Please describe the bug concisely. -->
|
||||||
|
|
||||||
|
**Version**
|
||||||
|
- [ ] I have checked releases, and the bug exists in the latest patch version of `v1` or `v2`.
|
||||||
|
- [ ] `v2`
|
||||||
|
- [ ] `v1`
|
||||||
|
|
||||||
|
**Runners**
|
||||||
|
<!-- Please mark the GitHub Action runner your workflow uses. -->
|
||||||
|
- [ ] GitHub Hosted
|
||||||
|
- [ ] Self Hosted
|
||||||
|
|
||||||
|
**Operating systems**
|
||||||
|
<!-- Please mention the operating systems your workflow uses. -->
|
||||||
|
|
||||||
|
**PHP versions**
|
||||||
|
<!-- Please mention the PHP versions your workflow uses. -->
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
<!-- Please provide the relevant steps of your workflow `.yml` file. -->
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
<!-- A clear and concise description of what you expected to happen. -->
|
||||||
|
|
||||||
|
**Screenshots/Logs**
|
||||||
|
<!-- If applicable, add screenshots or logs to help explain your problem. -->
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
<!-- Add any other context about the problem here. -->
|
||||||
|
|
||||||
|
**Are you willing to submit a PR?**
|
||||||
|
<!-- We accept pull requests targeting the develop branch. -->
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest a new feature
|
||||||
|
title: ''
|
||||||
|
labels: 'enhancement'
|
||||||
|
assignees: 'shivammathur'
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the feature**
|
||||||
|
<!-- Please describe concisely the feature you want to add. -->
|
||||||
|
|
||||||
|
**Version**
|
||||||
|
- [ ] I have checked releases, and the feature is missing in the latest patch version of `v2`.
|
||||||
|
|
||||||
|
**Underlying issue**
|
||||||
|
<!-- Please describe the issue this would solve. -->
|
||||||
|
|
||||||
|
**Describe alternatives**
|
||||||
|
<!-- Please mention any alternative solutions you've considered. -->
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
<!-- Add any other context or screenshots about the feature request here. -->
|
||||||
|
|
||||||
|
**Are you willing to submit a PR?**
|
||||||
|
<!-- We accept pull requests targeting the develop branch. -->
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
name: 🐞 Bug Fix, ⚙ Improvement or 🎉 New Feature
|
||||||
|
about: You found a bug, want to improve something or add a new feature
|
||||||
|
labels: bug or enhancement
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## A Pull Request should be associated with a Discussion.
|
||||||
|
|
||||||
|
> If you're fixing a bug, adding a new feature or improving something please provide the details in discussions,
|
||||||
|
> so that the development can be pointed in the intended direction.
|
||||||
|
|
||||||
|
Related discussion: <!-- Please link the related discussion -->
|
||||||
|
|
||||||
|
> Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md)
|
||||||
|
> Thank you for your contribution.
|
||||||
|
|
||||||
|
### Description
|
||||||
|
|
||||||
|
This PR [briefly explain what it does]
|
||||||
|
|
||||||
|
> In case this PR introduced TypeScript/JavaScript code changes:
|
||||||
|
|
||||||
|
- [ ] I have written test cases for the changes in this pull request
|
||||||
|
- [ ] I have run `npm run format` before the commit.
|
||||||
|
- [ ] I have run `npm run lint` before the commit.
|
||||||
|
- [ ] I have run `npm run release` before the commit.
|
||||||
|
- [ ] `npm test` returns with no unit test errors and all code covered.
|
||||||
|
|
||||||
|
> In case this PR edits any scripts:
|
||||||
|
|
||||||
|
- [ ] I have checked the edited scripts for syntax.
|
||||||
|
- [ ] I have tested the changes in an integration test (If yes, provide workflow YAML and link).
|
||||||
|
|
||||||
|
<!--
|
||||||
|
- Please target the develop branch when submitting the pull request.
|
||||||
|
-->
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
The latest patch versions of `v1` and `v2` releases of this project are supported for security updates.
|
||||||
|
|
||||||
|
## Supported PHP Versions
|
||||||
|
|
||||||
|
This security policy only applies to the latest patches of the following PHP versions.
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
|---------|--------------------|
|
||||||
|
| 7.4 | :white_check_mark: |
|
||||||
|
| 8.0 | :white_check_mark: |
|
||||||
|
| 8.1 | :white_check_mark: |
|
||||||
|
| 8.2 | :white_check_mark: |
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
If you have found any issues that might have security implications in the versions supported, please send a report privately to [contact@shivammathur.com](mailto:contact@shivammathur.com).
|
||||||
|
Do not report security reports publicly.
|
||||||
|
|
||||||
|
## Tidelift
|
||||||
|
|
||||||
|
If you use this GitHub Action through a Tidelift subscription, please refer to [https://tidelift.com/security](https://tidelift.com/security).
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
name : CodeQL Configuration
|
||||||
|
|
||||||
|
paths:
|
||||||
|
- './src'
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
target-branch: "develop"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
name: CodeQL Workflow
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 15 * * 6'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
codeql:
|
||||||
|
permissions:
|
||||||
|
actions: read # for github/codeql-action/init to get workflow details
|
||||||
|
contents: read # for actions/checkout to fetch code
|
||||||
|
security-events: write # for github/codeql-action/autobuild to send a status report
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
config-file: ./.github/codeql/codeql-configuration.yml
|
||||||
|
languages: javascript
|
||||||
|
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v2
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
name: Docs workflow
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 15 * * 6'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create:
|
||||||
|
permissions:
|
||||||
|
contents: none
|
||||||
|
name: Create
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-22.04, ubuntu-20.04, windows-2022, macos-11]
|
||||||
|
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
|
||||||
|
steps:
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
- name: Create for Linux and macOS
|
||||||
|
env:
|
||||||
|
file: php${{ matrix.php-versions }}-${{ matrix.operating-system }}.md
|
||||||
|
version: ${{ matrix.php-versions }}
|
||||||
|
if: matrix.operating-system != 'windows-2022'
|
||||||
|
run: |
|
||||||
|
echo "## PHP $version" >> "$file"
|
||||||
|
printf "\n" >> "$file"
|
||||||
|
echo "\`\`\`" >> "$file"
|
||||||
|
php -m >> "$file"
|
||||||
|
echo "\`\`\`" >> "$file"
|
||||||
|
printf "\n" >> "$file"
|
||||||
|
- name: Create for Windows
|
||||||
|
env:
|
||||||
|
file: php${{ matrix.php-versions }}-${{ matrix.operating-system }}.md
|
||||||
|
version: ${{ matrix.php-versions }}
|
||||||
|
if: matrix.operating-system == 'windows-2022'
|
||||||
|
run: |
|
||||||
|
Write-Output "## PHP ${{ matrix.php-versions }}`n" | Out-File -FilePath "$env:file"
|
||||||
|
Write-Output "``````" | Out-File -FilePath "$env:file" -Append
|
||||||
|
php -m | Out-File -FilePath "$env:file" -Append
|
||||||
|
Write-Output "```````n" | Out-File -FilePath "$env:file" -Append
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: lists
|
||||||
|
path: php${{ matrix.php-versions }}-${{ matrix.operating-system }}.md
|
||||||
|
update:
|
||||||
|
permissions:
|
||||||
|
contents: write # for Git to git push
|
||||||
|
name: Update
|
||||||
|
needs: create
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: ${{ github.repository }}.wiki
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}
|
||||||
|
- name: Configure Git
|
||||||
|
run : |
|
||||||
|
git config --local user.email "${{ secrets.email }}"
|
||||||
|
git config --local user.name "${{ github.repository_owner }}"
|
||||||
|
- name: Combine
|
||||||
|
run: |
|
||||||
|
for os in ubuntu-22.04 ubuntu-20.04 windows-2022 windows-2019 macos-11 macos-10.15; do
|
||||||
|
echo "These are extensions which are loaded by default on the following PHP versions. More extensions which are available as packages and available on pecl are supported by setup-php. Refer to [php extension support](https://github.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support) for more details." > Php-extensions-loaded-on-"$os".md
|
||||||
|
for version in 5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2; do
|
||||||
|
if [ "$os" = "macos-10.15" ]; then
|
||||||
|
cat lists/php"$version"-macos-11.md >> Php-extensions-loaded-on-"$os".md
|
||||||
|
elif [ "$os" = "windows-2019" ]; then
|
||||||
|
cat lists/php"$version"-windows-2022.md >> Php-extensions-loaded-on-"$os".md
|
||||||
|
else
|
||||||
|
cat lists/php"$version"-"$os".md >> Php-extensions-loaded-on-"$os".md
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
rm -rf ./lists
|
||||||
|
- name: Update
|
||||||
|
run: |
|
||||||
|
if [ "$(git status --porcelain=v1 2>/dev/null | wc -l)" != "0" ]; then
|
||||||
|
git add .
|
||||||
|
git commit -m "Update PHP extensions on wiki - $(date +'%d-%m-%y')"
|
||||||
|
git push -f https://${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git master || true
|
||||||
|
fi
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
name: Node workflow
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- verbose
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- 'examples/**'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- verbose
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- 'examples/**'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
name: Run
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: Setup Node.js 16.x
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16.x
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Prettier Format Check
|
||||||
|
run: npm run format-check
|
||||||
|
|
||||||
|
- name: ESLint Check
|
||||||
|
run: npm run lint
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: npm test
|
||||||
|
|
||||||
|
- name: Run npm audit
|
||||||
|
run: npm audit
|
||||||
|
|
||||||
|
- name: Send Coverage
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
files: coverage/lcov.info
|
||||||
|
name: github-actions-codecov-${{ matrix.operating-system }}
|
||||||
|
fail_ci_if_error: false
|
||||||
|
verbose: true
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
name: Main workflow
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- verbose
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- 'examples/**'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- verbose
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- 'examples/**'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
env:
|
||||||
|
default-php-version: '8.2'
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
name: Run
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-22.04, ubuntu-20.04, windows-2019, macos-latest]
|
||||||
|
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
|
||||||
|
include:
|
||||||
|
- operating-system: ubuntu-22.04
|
||||||
|
php-versions: ''
|
||||||
|
php-version-file: 'php-version-file'
|
||||||
|
env:
|
||||||
|
extensions: xml, opcache, xdebug, pcov, gd
|
||||||
|
key: cache-v5
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup cache environment
|
||||||
|
id: cache-env
|
||||||
|
uses: shivammathur/cache-extensions@develop
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions || env.default-php-version }}
|
||||||
|
extensions: ${{ env.extensions }}
|
||||||
|
key: ${{ env.key }}
|
||||||
|
|
||||||
|
- name: Cache extensions
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.cache-env.outputs.dir }}
|
||||||
|
key: ${{ steps.cache-env.outputs.key }}
|
||||||
|
restore-keys: ${{ steps.cache-env.outputs.key }}
|
||||||
|
|
||||||
|
- name: Stage php-version-file
|
||||||
|
if: ${{ matrix.php-version-file == 'php-version-file' }}
|
||||||
|
run: |
|
||||||
|
echo ${{ env.default-php-version }} > php-version-file
|
||||||
|
|
||||||
|
- name: Setup PHP with extensions and custom config
|
||||||
|
run: node dist/index.js
|
||||||
|
env:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
php-version-file: ${{ matrix.php-version-file }}
|
||||||
|
extensions: ${{ env.extensions }}
|
||||||
|
ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata
|
||||||
|
|
||||||
|
- name: Testing PHP version
|
||||||
|
run: |
|
||||||
|
php -v
|
||||||
|
php -r "if(strpos(phpversion(), '${{ matrix.php-versions || env.default-php-version }}') === false) {throw new Exception('Wrong PHP version Installed');}"
|
||||||
|
|
||||||
|
- name: Testing Composer version
|
||||||
|
run: |
|
||||||
|
composer -V
|
||||||
|
php -r "if(strpos(@exec('composer -V'), 'Composer version') === false) {throw new Exception('Composer not found');}"
|
||||||
|
- name: Testing Extensions
|
||||||
|
run: |
|
||||||
|
php -m
|
||||||
|
php -r "if(! extension_loaded('gd')) {throw new Exception('gd not found');}"
|
||||||
|
php -r "if(! extension_loaded('xml')) {throw new Exception('xml not found');}"
|
||||||
|
php -r "if(! extension_loaded('Xdebug')) {throw new Exception('Xdebug not found');}"
|
||||||
|
php -r "if(phpversion()>=7.1 && ! extension_loaded('pcov')) {throw new Exception('PCOV not found');}"
|
||||||
|
- name: Testing ini values
|
||||||
|
run: |
|
||||||
|
php -r "if(ini_get('memory_limit')!='-1') {throw new Exception('memory_limit not disabled');}"
|
||||||
|
php -r "if(ini_get('post_max_size')!='256M') {throw new Exception('post_max_size not added');}"
|
||||||
|
php -r "if(ini_get('short_open_tag')!=1) {throw new Exception('short_open_tag not added');}"
|
||||||
|
php -r "if(ini_get('date.timezone')!='Asia/Kolkata') {throw new Exception('date.timezone not added');}"
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
name: Publish Package
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
skip:
|
||||||
|
description: Skip release to repository
|
||||||
|
required: false
|
||||||
|
tag:
|
||||||
|
description: Tag name
|
||||||
|
required: true
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout release
|
||||||
|
if: github.event_name != 'workflow_dispatch'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Checkout tag
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.tag }}
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '16.x'
|
||||||
|
registry-url: https://registry.npmjs.org
|
||||||
|
|
||||||
|
- name: Install dependencies and add lib
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
sed -i -e '/lib\//d' .gitignore
|
||||||
|
|
||||||
|
- name: Publish to NPM
|
||||||
|
if: "!contains(github.event.inputs.skip, 'skip-npm')"
|
||||||
|
run: npm publish --access public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
- name: Change to GitHub Packages registry
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
registry-url: https://npm.pkg.github.com
|
||||||
|
scope: '@shivammathur'
|
||||||
|
|
||||||
|
- name: Patch package.json
|
||||||
|
run: |
|
||||||
|
sed -i 's#"name": "#"name": "@shivammathur/#' package.json
|
||||||
|
|
||||||
|
- name: Publish to GitHub Packages
|
||||||
|
if: "!contains(github.event.inputs.skip, 'skip-github-packages')"
|
||||||
|
run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
name: Main workflow
|
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
name: Run
|
|
||||||
runs-on: ${{ matrix.operating-system }}
|
|
||||||
strategy:
|
|
||||||
max-parallel: 15
|
|
||||||
matrix:
|
|
||||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
|
||||||
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3']
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
- name: Set Node.js 10.x
|
|
||||||
uses: actions/setup-node@master
|
|
||||||
with:
|
|
||||||
version: 10.x
|
|
||||||
|
|
||||||
- name: Installing NPM
|
|
||||||
run: npm install
|
|
||||||
|
|
||||||
- name: Installing PHP
|
|
||||||
run: node lib/install.js
|
|
||||||
env:
|
|
||||||
php-version: ${{ matrix.php-versions }}
|
|
||||||
+93
@@ -0,0 +1,93 @@
|
|||||||
|
# Explicitly not ignoring node_modules so that they are included in package downloaded by runner
|
||||||
|
node_modules/
|
||||||
|
__tests__/runner/*
|
||||||
|
lib/
|
||||||
|
|
||||||
|
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
.env.test
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# next.js build output
|
||||||
|
.next
|
||||||
|
|
||||||
|
# nuxt.js build output
|
||||||
|
.nuxt
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
+7
-6
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"bracketSpacing": false,
|
||||||
|
"endOfLine": "auto",
|
||||||
|
"parser": "typescript",
|
||||||
"printWidth": 80,
|
"printWidth": 80,
|
||||||
"tabWidth": 2,
|
|
||||||
"useTabs": false,
|
|
||||||
"semi": true,
|
"semi": true,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
|
"tabWidth": 2,
|
||||||
"trailingComma": "none",
|
"trailingComma": "none",
|
||||||
"bracketSpacing": false,
|
"useTabs": false
|
||||||
"arrowParens": "avoid",
|
}
|
||||||
"parser": "typescript"
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2019 shivammathur and contributors
|
Copyright (c) shivammathur and contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import * as config from '../src/config';
|
||||||
|
|
||||||
|
describe('Config tests', () => {
|
||||||
|
it.each`
|
||||||
|
ini_values | os | output
|
||||||
|
${'a=b, c=d'} | ${'win32'} | ${'Add-Content "$php_dir\\php.ini" "a=b\nc=d"'}
|
||||||
|
${'a=b, c=d'} | ${'linux'} | ${'echo "a=b\nc=d" | sudo tee -a "${pecl_file:-${ini_file[@]}}"'}
|
||||||
|
${'a=b, c=d'} | ${'darwin'} | ${'echo "a=b\nc=d" | sudo tee -a "${pecl_file:-${ini_file[@]}}"'}
|
||||||
|
${'a=b & ~c'} | ${'win32'} | ${'Add-Content "$php_dir\\php.ini" "a=\'b & ~c\'"'}
|
||||||
|
${'a="~(b)"'} | ${'win32'} | ${'Add-Content "$php_dir\\php.ini" "a=\'~(b)\'"'}
|
||||||
|
${'a="b, c"'} | ${'win32'} | ${'Add-Content "$php_dir\\php.ini" "a=b, c"'}
|
||||||
|
${'a=b, c=d'} | ${'openbsd'} | ${'Platform openbsd is not supported'}
|
||||||
|
`('checking addINIValues on $os', async ({ini_values, os, output}) => {
|
||||||
|
expect(await config.addINIValues(ini_values, os)).toContain(output);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
import * as coverage from '../src/coverage';
|
||||||
|
|
||||||
|
describe('Config tests', () => {
|
||||||
|
it.each`
|
||||||
|
driver | php | os | output
|
||||||
|
${'PCOV'} | ${'7.4'} | ${'win32'} | ${'Add-Extension pcov,Disable-Extension xdebug false'}
|
||||||
|
${'pcov'} | ${'7.4'} | ${'win32'} | ${'$pcov_version = php -r "echo phpversion(\'pcov\');"'}
|
||||||
|
${'pcov'} | ${'7.4'} | ${'win32'} | ${'PCOV $pcov_version enabled as coverage driver'}
|
||||||
|
${'pcov'} | ${'7.0'} | ${'win32'} | ${'PHP 7.1 or newer is required'}
|
||||||
|
${'pcov'} | ${'5.6'} | ${'win32'} | ${'PHP 7.1 or newer is required'}
|
||||||
|
${'pcov'} | ${'7.4'} | ${'win32'} | ${'Add-Extension pcov,Disable-Extension xdebug false'}
|
||||||
|
${'pcov'} | ${'7.4'} | ${'linux'} | ${'add_extension pcov,disable_extension xdebug false'}
|
||||||
|
${'pcov'} | ${'7.4'} | ${'darwin'} | ${'add_brew_extension pcov,disable_extension xdebug false'}
|
||||||
|
${'xdebug'} | ${'7.4'} | ${'win32'} | ${'Add-Extension xdebug'}
|
||||||
|
${'xdebug3'} | ${'7.1'} | ${'win32'} | ${'xdebug3 is not supported on PHP 7.1'}
|
||||||
|
${'xdebug2'} | ${'7.4'} | ${'win32'} | ${'Add-Extension xdebug stable 2.9.8'}
|
||||||
|
${'xdebug'} | ${'8.0'} | ${'linux'} | ${'add_extension xdebug'}
|
||||||
|
${'xdebug3'} | ${'8.0'} | ${'linux'} | ${'add_extension xdebug'}
|
||||||
|
${'xdebug2'} | ${'7.4'} | ${'linux'} | ${'add_pecl_extension xdebug 2.9.8 zend_extension'}
|
||||||
|
${'xdebug'} | ${'7.4'} | ${'linux'} | ${'xdebug_version="$(php -r "echo phpversion(\'xdebug\');")"'}
|
||||||
|
${'xdebug'} | ${'7.4'} | ${'linux'} | ${'Xdebug $xdebug_version enabled as coverage driver'}
|
||||||
|
${'xdebug'} | ${'7.4'} | ${'darwin'} | ${'add_brew_extension xdebug'}
|
||||||
|
${'xdebug3'} | ${'7.1'} | ${'darwin'} | ${'xdebug3 is not supported on PHP 7.1'}
|
||||||
|
${'xdebug2'} | ${'7.4'} | ${'darwin'} | ${'add_brew_extension xdebug2'}
|
||||||
|
${'xdebug2'} | ${'8.0'} | ${'darwin'} | ${'xdebug2 is not supported on PHP 8.0'}
|
||||||
|
${'none'} | ${'7.4'} | ${'win32'} | ${'Disable-Extension xdebug false,Disable-Extension pcov false'}
|
||||||
|
${'none'} | ${'7.4'} | ${'linux'} | ${'disable_extension xdebug false,disable_extension pcov false'}
|
||||||
|
${'none'} | ${'7.4'} | ${'darwin'} | ${'disable_extension xdebug false,disable_extension pcov false'}
|
||||||
|
${'nocov'} | ${'7.x'} | ${'any'} | ${''}
|
||||||
|
${''} | ${'7.x'} | ${'any'} | ${''}
|
||||||
|
`(
|
||||||
|
'checking addCoverage with $driver on $os',
|
||||||
|
async ({driver, php, os, output}) => {
|
||||||
|
const script: string = await coverage.addCoverage(driver, php, os);
|
||||||
|
if (output) {
|
||||||
|
output.split(',').forEach((command: string) => {
|
||||||
|
expect(script).toContain(command);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
expect(script).toEqual(output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
import * as fs from 'fs';
|
||||||
|
import * as extensions from '../src/extensions';
|
||||||
|
|
||||||
|
describe('Extension tests', () => {
|
||||||
|
it.each`
|
||||||
|
extension | version | output
|
||||||
|
${'none'} | ${'7.4'} | ${'Disable-AllShared'}
|
||||||
|
${':intl'} | ${'7.4'} | ${'Disable-Extension intl'}
|
||||||
|
${'ast-beta'} | ${'7.4'} | ${'Add-Extension ast beta'}
|
||||||
|
${'blackfire'} | ${'7.3'} | ${'Add-Blackfire blackfire'}
|
||||||
|
${'blackfire-1.31.0'} | ${'7.3'} | ${'Add-Blackfire blackfire-1.31.0'}
|
||||||
|
${'grpc-1.2.3'} | ${'7.4'} | ${'Add-Extension grpc stable 1.2.3'}
|
||||||
|
${'inotify-1.2.3alpha2'} | ${'7.4'} | ${'Add-Extension inotify alpha 1.2.3'}
|
||||||
|
${'ioncube'} | ${'7.4'} | ${'Add-Ioncube'}
|
||||||
|
${'mongodb-mongodb/mongo-php-driver@master'} | ${'7.3'} | ${'Add-Log "$cross" "mongodb-mongodb/mongo-php-driver@master" "mongodb-mongodb/mongo-php-driver@master is not supported on PHP 7.3"'}
|
||||||
|
${'mysql'} | ${'7.4'} | ${'Add-Extension mysqli\nAdd-Extension mysqlnd'}
|
||||||
|
${'mysql'} | ${'5.5'} | ${'Add-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd'}
|
||||||
|
${'oci8'} | ${'7.4'} | ${'Add-Oci oci8'}
|
||||||
|
${'pcov'} | ${'5.6'} | ${'Add-Log "$cross" "pcov" "pcov is not supported on PHP 5.6"'}
|
||||||
|
${'pdo_oci'} | ${'7.4'} | ${'Add-Oci pdo_oci'}
|
||||||
|
${'pecl_http'} | ${'7.4'} | ${'Add-Http'}
|
||||||
|
${'pdo_sqlsrv'} | ${'7.4'} | ${'Add-Sqlsrv pdo_sqlsrv'}
|
||||||
|
${'phalcon3'} | ${'7.2'} | ${'Add-Phalcon phalcon3'}
|
||||||
|
${'phalcon4'} | ${'7.4'} | ${'Add-Phalcon phalcon4'}
|
||||||
|
${'sqlite'} | ${'7.4'} | ${'Add-Extension sqlite3'}
|
||||||
|
${'sqlsrv'} | ${'5.6'} | ${'Add-Extension sqlsrv'}
|
||||||
|
${'sqlsrv'} | ${'7.4'} | ${'Add-Sqlsrv sqlsrv'}
|
||||||
|
${'sqlsrv-1.2.3preview1'} | ${'7.4'} | ${'Add-Extension sqlsrv devel 1.2.3'}
|
||||||
|
${'Xdebug'} | ${'7.4'} | ${'Add-Extension xdebug'}
|
||||||
|
${'xdebug2'} | ${'7.2'} | ${'Add-Extension xdebug stable 2.9.8'}
|
||||||
|
${'zephir_parser'} | ${'7.2'} | ${'Add-ZephirParser zephir_parser'}
|
||||||
|
`(
|
||||||
|
'checking addExtensionOnWindows for extension $extension on version $version',
|
||||||
|
async ({extension, version, output}) => {
|
||||||
|
expect(
|
||||||
|
await extensions.addExtension(extension, version, 'win32')
|
||||||
|
).toContain(output);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
extension | version | output
|
||||||
|
${'none'} | ${'7.4'} | ${'disable_all_shared'}
|
||||||
|
${':intl'} | ${'7.4'} | ${'disable_extension intl'}
|
||||||
|
${'ast-beta'} | ${'7.4'} | ${'add_unstable_extension ast beta extension'}
|
||||||
|
${'blackfire'} | ${'7.3'} | ${'add_blackfire blackfire'}
|
||||||
|
${'blackfire-1.31.0'} | ${'7.3'} | ${'add_blackfire blackfire-1.31.0'}
|
||||||
|
${'couchbase'} | ${'7.4'} | ${'add_couchbase'}
|
||||||
|
${'gearman'} | ${'5.6'} | ${'add_gearman'}
|
||||||
|
${'geos'} | ${'7.3'} | ${'add_geos'}
|
||||||
|
${'grpc-1.2.3'} | ${'7.4'} | ${'add_pecl_extension grpc 1.2.3 extension'}
|
||||||
|
${'http-1.2.3'} | ${'7.3'} | ${'add_http http-1.2.3'}
|
||||||
|
${'intl-65.1'} | ${'5.6'} | ${'add_intl intl-65.1'}
|
||||||
|
${'ioncube'} | ${'7.3'} | ${'add_ioncube'}
|
||||||
|
${'memcache-8.2'} | ${'8.2'} | ${'add_pecl_extension memcache 8.2 extension'}
|
||||||
|
${'mongodb-mongodb/mongo-php-driver@master'} | ${'7.3'} | ${'add_extension_from_source mongodb https://github.com mongodb mongo-php-driver master extension'}
|
||||||
|
${'oci8'} | ${'7.3'} | ${'add_oci oci8'}
|
||||||
|
${'pcov'} | ${'5.6'} | ${'add_log "$cross" "pcov" "pcov is not supported on PHP 5.6'}
|
||||||
|
${'pdo-odbc'} | ${'7.4'} | ${'add_pdo_extension odbc'}
|
||||||
|
${'pdo_cubrid'} | ${'7.0'} | ${'add_cubrid pdo_cubrid'}
|
||||||
|
${'pdo_cubrid'} | ${'7.4'} | ${'add_pdo_extension cubrid'}
|
||||||
|
${'pdo_mysql'} | ${'7.4'} | ${'add_pdo_extension mysql'}
|
||||||
|
${'pdo_oci'} | ${'7.3'} | ${'add_oci pdo_oci'}
|
||||||
|
${'pdo_sqlsrv'} | ${'7.4'} | ${'add_sqlsrv pdo_sqlsrv'}
|
||||||
|
${'pecl_http'} | ${'7.3'} | ${'add_http'}
|
||||||
|
${'phalcon3'} | ${'7.3'} | ${'add_phalcon phalcon3'}
|
||||||
|
${'relay'} | ${'7.4'} | ${'add_relay relay'}
|
||||||
|
${'relay-v1.2.3'} | ${'7.4'} | ${'add_relay relay-v1.2.3'}
|
||||||
|
${'sqlite'} | ${'7.4'} | ${'add_extension sqlite3'}
|
||||||
|
${'sqlsrv-1.2.3-beta1'} | ${'7.4'} | ${'add_pecl_extension sqlsrv 1.2.3beta1 extension'}
|
||||||
|
${'Xdebug'} | ${'7.4'} | ${'add_extension xdebug'}
|
||||||
|
${'xdebug-alpha'} | ${'7.4'} | ${'add_unstable_extension xdebug alpha zend_extension'}
|
||||||
|
${'xdebug2'} | ${'7.2'} | ${'add_pecl_extension xdebug 2.9.8 zend_extension'}
|
||||||
|
${'zephir_parser-1.2.3'} | ${'7.2'} | ${'add_zephir_parser zephir_parser-1.2.3'}
|
||||||
|
`(
|
||||||
|
'checking addExtensionOnLinux for extension $extension on version $version',
|
||||||
|
async ({extension, version, output}) => {
|
||||||
|
expect(
|
||||||
|
await extensions.addExtension(extension, version, 'linux')
|
||||||
|
).toContain(output);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
extension | version | output
|
||||||
|
${'none'} | ${'7.2'} | ${'disable_all_shared'}
|
||||||
|
${':intl'} | ${'7.2'} | ${'disable_extension intl'}
|
||||||
|
${'ast-beta'} | ${'7.2'} | ${'add_unstable_extension ast beta extension'}
|
||||||
|
${'blackfire'} | ${'7.3'} | ${'add_blackfire blackfire'}
|
||||||
|
${'blackfire-1.31.0'} | ${'7.3'} | ${'add_blackfire blackfire-1.31.0'}
|
||||||
|
${'couchbase'} | ${'5.6'} | ${'add_couchbase'}
|
||||||
|
${'does_not_exist'} | ${'7.2'} | ${'add_extension does_not_exist'}
|
||||||
|
${'geos'} | ${'7.3'} | ${'add_geos'}
|
||||||
|
${'grpc-1.2.3'} | ${'7.2'} | ${'add_pecl_extension grpc 1.2.3 extension'}
|
||||||
|
${'http-1.2.3'} | ${'7.3'} | ${'add_http http-1.2.3'}
|
||||||
|
${'imagick'} | ${'5.5'} | ${'add_extension imagick'}
|
||||||
|
${'ioncube'} | ${'7.3'} | ${'add_ioncube'}
|
||||||
|
${'mongodb-mongodb/mongo-php-driver@master'} | ${'7.2'} | ${'add_extension_from_source mongodb https://github.com mongodb mongo-php-driver master extension'}
|
||||||
|
${'oci8'} | ${'7.3'} | ${'add_oci oci8'}
|
||||||
|
${'pcov'} | ${'5.6'} | ${'add_log "$cross" "pcov" "pcov is not supported on PHP 5.6"'}
|
||||||
|
${'pdo_oci'} | ${'7.3'} | ${'add_oci pdo_oci'}
|
||||||
|
${'pecl_http'} | ${'7.3'} | ${'add_http'}
|
||||||
|
${'relay-1.2.3'} | ${'7.4'} | ${'add_relay relay-1.2.3'}
|
||||||
|
${'sqlite'} | ${'7.2'} | ${'add_extension sqlite3'}
|
||||||
|
${'zephir_parser-v1.2.3'} | ${'7.2'} | ${'add_zephir_parser zephir_parser-v1.2.3'}
|
||||||
|
`(
|
||||||
|
'checking addExtensionOnDarwin for extension $extension on version $version',
|
||||||
|
async ({extension, version, output}) => {
|
||||||
|
expect(
|
||||||
|
await extensions.addExtension(extension, version, 'darwin')
|
||||||
|
).toContain(output);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const data: string[][] = fs
|
||||||
|
.readFileSync('src/configs/brew_extensions')
|
||||||
|
.toString()
|
||||||
|
.split(/\r?\n/)
|
||||||
|
.filter(Boolean)
|
||||||
|
.map(line => {
|
||||||
|
const [formula, extension]: string[] = line.split('=');
|
||||||
|
const prefix: string =
|
||||||
|
extension == 'xdebug' ? 'zend_extension' : 'extension';
|
||||||
|
const ext_name = extension.replace(/\d+|(pdo|pecl)[_-]/, '');
|
||||||
|
const output: string = fs.existsSync(
|
||||||
|
`src/scripts/extensions/${ext_name}.sh`
|
||||||
|
)
|
||||||
|
? `add_${ext_name}`
|
||||||
|
: `add_brew_extension ${formula} ${prefix}`;
|
||||||
|
return [formula, formula === 'phalcon3' ? '7.3' : '7.4', output];
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each(data)(
|
||||||
|
'checking addExtensionOnDarwin for brew extension %s',
|
||||||
|
async (extension, version, output) => {
|
||||||
|
expect(
|
||||||
|
await extensions.addExtension(extension, version, 'darwin')
|
||||||
|
).toContain(output);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
extension | version | output
|
||||||
|
${'xdebug'} | ${'7.2'} | ${'Platform openbsd is not supported'}
|
||||||
|
`(
|
||||||
|
'checking addExtension on openbsd for extension $extension on version $version',
|
||||||
|
async ({extension, version, output}) => {
|
||||||
|
expect(
|
||||||
|
await extensions.addExtension(extension, version, 'openbsd')
|
||||||
|
).toContain(output);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import * as fetch from '../src/fetch';
|
||||||
|
import nock = require('nock');
|
||||||
|
|
||||||
|
it('checking fetch', async () => {
|
||||||
|
const host_url = 'https://example.com';
|
||||||
|
const manifest_url = host_url + '/manifest';
|
||||||
|
const ping_url = host_url + '/ping';
|
||||||
|
|
||||||
|
nock(host_url)
|
||||||
|
.get('/manifest')
|
||||||
|
.reply(200, {latest: 'latest'})
|
||||||
|
.get('/manifest', '', {
|
||||||
|
reqheaders: {authorization: 'Bearer invalid_token'}
|
||||||
|
})
|
||||||
|
.reply(401, {error: '401: Unauthorized'})
|
||||||
|
.get('/ping')
|
||||||
|
.twice()
|
||||||
|
.reply(301, undefined, {
|
||||||
|
Location: host_url + '/pong'
|
||||||
|
})
|
||||||
|
.get('/pong')
|
||||||
|
.reply(200, 'pong');
|
||||||
|
|
||||||
|
let response: Record<string, string> = await fetch.fetch(manifest_url);
|
||||||
|
expect(response.error).toBe(undefined);
|
||||||
|
expect(response.data).toContain('latest');
|
||||||
|
|
||||||
|
response = await fetch.fetch(ping_url, '', 1);
|
||||||
|
expect(response.error).toBe(undefined);
|
||||||
|
expect(response.data).toContain('pong');
|
||||||
|
|
||||||
|
response = await fetch.fetch(ping_url, '', 0);
|
||||||
|
expect(response.error).toBe('301: Redirect error');
|
||||||
|
expect(response.data).toBe(undefined);
|
||||||
|
|
||||||
|
response = await fetch.fetch(manifest_url, 'invalid_token');
|
||||||
|
expect(response.error).not.toBe(undefined);
|
||||||
|
expect(response.data).toBe(undefined);
|
||||||
|
});
|
||||||
@@ -1,6 +1,82 @@
|
|||||||
let a = '2';
|
import * as install from '../src/install';
|
||||||
describe('Finder tests', () => {
|
import * as utils from '../src/utils';
|
||||||
it('checking 2', async () => {
|
|
||||||
expect(a).toBe('2');
|
/**
|
||||||
});
|
* Mock install.ts
|
||||||
|
*/
|
||||||
|
jest.mock('../src/install', () => ({
|
||||||
|
getScript: jest
|
||||||
|
.fn()
|
||||||
|
.mockImplementation(async (os: string): Promise<string> => {
|
||||||
|
const filename = os + (await utils.scriptExtension(os));
|
||||||
|
const version: string = await utils.parseVersion(
|
||||||
|
await utils.readPHPVersion()
|
||||||
|
);
|
||||||
|
const ini_file: string = await utils.parseIniFile(
|
||||||
|
await utils.getInput('ini-file', false)
|
||||||
|
);
|
||||||
|
const extension_csv: string = process.env['extensions'] || '';
|
||||||
|
const ini_values_csv: string = process.env['ini-values'] || '';
|
||||||
|
const coverage_driver: string = process.env['coverage'] || '';
|
||||||
|
const tools_csv: string = process.env['tools'] || '';
|
||||||
|
let script = await utils.joins(filename, version, ini_file);
|
||||||
|
script += extension_csv ? ' install extensions' : '';
|
||||||
|
script += tools_csv ? ' add_tool' : '';
|
||||||
|
script += coverage_driver ? ' set coverage driver' : '';
|
||||||
|
script += ini_values_csv ? ' edit php.ini' : '';
|
||||||
|
return script;
|
||||||
|
}),
|
||||||
|
run: jest.fn().mockImplementation(async (): Promise<string> => {
|
||||||
|
const os: string = process.env['RUNNER_OS'] || '';
|
||||||
|
const tool = await utils.scriptTool(os);
|
||||||
|
return tool + (await install.getScript(os));
|
||||||
|
})
|
||||||
|
}));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mock fetch.ts
|
||||||
|
*/
|
||||||
|
jest.mock('../src/fetch', () => ({
|
||||||
|
fetch: jest.fn().mockImplementation(() => {
|
||||||
|
return {data: '{ "latest": "8.1", "5.x": "5.6" }'};
|
||||||
|
})
|
||||||
|
}));
|
||||||
|
|
||||||
|
describe('Install', () => {
|
||||||
|
it.each`
|
||||||
|
version | os | extension_csv | ini_file | ini_values_csv | coverage_driver | tools | output
|
||||||
|
${'7.3'} | ${'darwin'} | ${''} | ${'production'} | ${''} | ${''} | ${''} | ${'bash darwin.sh 7.3 production'}
|
||||||
|
${'7.3'} | ${'darwin'} | ${'a, b'} | ${'development'} | ${'a=b'} | ${'x'} | ${''} | ${'bash darwin.sh 7.3 development install extensions set coverage driver edit php.ini'}
|
||||||
|
${'7.4.1'} | ${'darwin'} | ${''} | ${'none'} | ${''} | ${''} | ${''} | ${'bash darwin.sh 7.4 none'}
|
||||||
|
${'8'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${''} | ${'bash darwin.sh 8.0 production'}
|
||||||
|
${'8.0'} | ${'darwin'} | ${''} | ${'development'} | ${''} | ${''} | ${''} | ${'bash darwin.sh 8.0 development'}
|
||||||
|
${'8.1'} | ${'darwin'} | ${''} | ${'none'} | ${''} | ${''} | ${''} | ${'bash darwin.sh 8.1 none'}
|
||||||
|
${'7.3'} | ${'linux'} | ${''} | ${'invalid'} | ${''} | ${''} | ${''} | ${'bash linux.sh 7.3 production'}
|
||||||
|
${'7.3'} | ${'linux'} | ${'a, b'} | ${'development'} | ${'a=b'} | ${'x'} | ${'phpunit'} | ${'bash linux.sh 7.3 development install extensions add_tool set coverage driver edit php.ini'}
|
||||||
|
${'latest'} | ${'linux'} | ${''} | ${'none'} | ${''} | ${''} | ${''} | ${'bash linux.sh 8.1 none'}
|
||||||
|
${'7.0'} | ${'win32'} | ${''} | ${'production'} | ${''} | ${''} | ${''} | ${'pwsh win32.ps1 7.0 production'}
|
||||||
|
${'7.3'} | ${'win32'} | ${''} | ${'development'} | ${''} | ${''} | ${''} | ${'pwsh win32.ps1 7.3 development'}
|
||||||
|
${'7.3'} | ${'win32'} | ${'a, b'} | ${'none'} | ${'a=b'} | ${'x'} | ${''} | ${'pwsh win32.ps1 7.3 none install extensions set coverage driver edit php.ini'}
|
||||||
|
`(
|
||||||
|
'Test install on $os for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools',
|
||||||
|
async ({
|
||||||
|
version,
|
||||||
|
os,
|
||||||
|
extension_csv,
|
||||||
|
ini_file,
|
||||||
|
ini_values_csv,
|
||||||
|
coverage_driver,
|
||||||
|
tools,
|
||||||
|
output
|
||||||
|
}) => {
|
||||||
|
process.env['php-version'] = version.toString();
|
||||||
|
process.env['RUNNER_OS'] = os;
|
||||||
|
process.env['extensions'] = extension_csv;
|
||||||
|
process.env['ini-file'] = ini_file;
|
||||||
|
process.env['ini-values'] = ini_values_csv;
|
||||||
|
process.env['coverage'] = coverage_driver;
|
||||||
|
process.env['tools'] = tools;
|
||||||
|
expect(await install.run()).toBe(output);
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import * as packagist from '../src/packagist';
|
||||||
|
import nock = require('nock');
|
||||||
|
|
||||||
|
describe('search function', () => {
|
||||||
|
const mockResponse = {
|
||||||
|
packages: {
|
||||||
|
'test-package': [
|
||||||
|
{
|
||||||
|
require: {
|
||||||
|
php: '8.0.0'
|
||||||
|
},
|
||||||
|
version: '1.0.0'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
version: '2.0.0'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
test('should return the version if matching php version is found', async () => {
|
||||||
|
nock('https://repo.packagist.org')
|
||||||
|
.get('/p2/test-package.json')
|
||||||
|
.reply(200, mockResponse);
|
||||||
|
const result = await packagist.search('test-package', '8.0');
|
||||||
|
expect(result).toBe('1.0.0');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should return null if no matching php version is found', async () => {
|
||||||
|
nock('https://repo.packagist.org')
|
||||||
|
.get('/p2/test-package.json')
|
||||||
|
.reply(200, mockResponse);
|
||||||
|
const result = await packagist.search('test-package', '5.6');
|
||||||
|
expect(result).toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should return null if fetch fails', async () => {
|
||||||
|
nock('https://repo.packagist.org').get('/p2/test-package.json').reply(404);
|
||||||
|
const result = await packagist.search('test-package', '8.0');
|
||||||
|
expect(result).toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('should return null if the response is empty', async () => {
|
||||||
|
nock('https://repo.packagist.org')
|
||||||
|
.get('/p2/test-package.json')
|
||||||
|
.reply(200, {error: true, data: '[]'});
|
||||||
|
const result = await packagist.search('test-package', '8.0');
|
||||||
|
expect(result).toBeNull();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,608 @@
|
|||||||
|
import fs = require('fs');
|
||||||
|
import * as tools from '../src/tools';
|
||||||
|
|
||||||
|
interface IData {
|
||||||
|
tool: string;
|
||||||
|
version?: string;
|
||||||
|
domain?: string;
|
||||||
|
extension?: string;
|
||||||
|
os?: string;
|
||||||
|
php_version?: string;
|
||||||
|
release?: string;
|
||||||
|
repository?: string;
|
||||||
|
scope?: string;
|
||||||
|
type?: string;
|
||||||
|
fetch_latest?: string;
|
||||||
|
version_parameter?: string;
|
||||||
|
version_prefix?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getData(data: IData): Record<string, string> {
|
||||||
|
return {
|
||||||
|
tool: data.tool,
|
||||||
|
version: data.version || '',
|
||||||
|
domain: data.domain || 'https://example.com',
|
||||||
|
extension: data.extension || '.phar',
|
||||||
|
os: data.os || 'linux',
|
||||||
|
php_version: data.php_version || '7.4',
|
||||||
|
release: data.release || [data.tool, data.version].join(':'),
|
||||||
|
repository: data.repository || '',
|
||||||
|
scope: data.scope || 'global',
|
||||||
|
type: data.type || 'phar',
|
||||||
|
fetch_latest: data.fetch_latest || 'false',
|
||||||
|
version_parameter: data.version_parameter || '-V',
|
||||||
|
version_prefix: data.version_prefix || '',
|
||||||
|
github: 'https://github.com',
|
||||||
|
prefix: 'releases',
|
||||||
|
verb: 'download'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mock fetch.ts
|
||||||
|
*/
|
||||||
|
jest.mock('../src/fetch', () => ({
|
||||||
|
fetch: jest
|
||||||
|
.fn()
|
||||||
|
.mockImplementation(
|
||||||
|
async (url: string, token?: string): Promise<Record<string, string>> => {
|
||||||
|
if (url.includes('deployer')) {
|
||||||
|
return {
|
||||||
|
data: '[{"version": "1.2.3", "url": "https://deployer.org/releases/v1.2.3/deployer.phar"}]'
|
||||||
|
};
|
||||||
|
} else if (url.includes('atom') && !url.includes('no-')) {
|
||||||
|
return {
|
||||||
|
data: '"releases/tag/1.2.3", "releases/tag/3.2.1", "releases/tag/2.3.1"'
|
||||||
|
};
|
||||||
|
} else if (url.includes('no-data')) {
|
||||||
|
return {};
|
||||||
|
} else if (url.includes('no-release')) {
|
||||||
|
return {data: 'no-release'};
|
||||||
|
} else if (!token || token === 'valid_token') {
|
||||||
|
return {data: `[{"ref": "refs/tags/1.2.3", "url": "${url}"}]`};
|
||||||
|
} else if (token === 'beta_token') {
|
||||||
|
return {data: `[{"ref": "refs/tags/1.2.3-beta1", "url": "${url}"}]`};
|
||||||
|
} else if (token === 'no_data') {
|
||||||
|
return {data: '[]'};
|
||||||
|
} else {
|
||||||
|
return {error: 'Invalid token'};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}));
|
||||||
|
|
||||||
|
jest.mock('../src/packagist', () => ({
|
||||||
|
search: jest
|
||||||
|
.fn()
|
||||||
|
.mockImplementation(
|
||||||
|
async (
|
||||||
|
package_name: string,
|
||||||
|
php_version: string
|
||||||
|
): Promise<string | null> => {
|
||||||
|
if (package_name === 'phpunit/phpunit') {
|
||||||
|
return php_version + '.0';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}));
|
||||||
|
|
||||||
|
describe('Tools tests', () => {
|
||||||
|
it.each`
|
||||||
|
token | version
|
||||||
|
${'invalid_token'} | ${'1.2'}
|
||||||
|
${'valid_token'} | ${'1.2.3'}
|
||||||
|
${'beta_token'} | ${'1.2.3-beta1'}
|
||||||
|
${''} | ${'1.2.3'}
|
||||||
|
`('checking getSemverVersion: $token', async ({token, version}) => {
|
||||||
|
process.env['COMPOSER_TOKEN'] = token;
|
||||||
|
expect(
|
||||||
|
await tools.getSemverVersion(getData({tool: 'tool', version: '1.2'}))
|
||||||
|
).toBe(version);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
tool | fetch_latest | version
|
||||||
|
${'tool'} | ${'true'} | ${'3.2.1'}
|
||||||
|
${'tool-no-data'} | ${'true'} | ${'latest'}
|
||||||
|
${'tool-no-release'} | ${'true'} | ${'latest'}
|
||||||
|
${'tool'} | ${'false'} | ${'latest'}
|
||||||
|
`(
|
||||||
|
'checking getLatestVersion: $tool, $fetch_latest, $version',
|
||||||
|
async ({tool, fetch_latest, version}) => {
|
||||||
|
expect(
|
||||||
|
await tools.getLatestVersion(
|
||||||
|
getData({
|
||||||
|
tool: tool,
|
||||||
|
repository: 'user/' + tool,
|
||||||
|
fetch_latest: fetch_latest
|
||||||
|
})
|
||||||
|
)
|
||||||
|
).toBe(version);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
version | tool | type | expected
|
||||||
|
${'latest'} | ${'tool'} | ${'phar'} | ${'latest'}
|
||||||
|
${'1'} | ${'composer'} | ${'phar'} | ${'1'}
|
||||||
|
${'1.2'} | ${'tool'} | ${'composer'} | ${'1.2.*'}
|
||||||
|
${'^1.2.3'} | ${'tool'} | ${'phar'} | ${'1.2.3'}
|
||||||
|
${'>=1.2.3'} | ${'tool'} | ${'phar'} | ${'1.2.3'}
|
||||||
|
${'>1.2.3'} | ${'tool'} | ${'phar'} | ${'1.2.3'}
|
||||||
|
${'1.2.3-ALPHA'} | ${'tool'} | ${'phar'} | ${'1.2.3-ALPHA'}
|
||||||
|
${'1.2.3-alpha'} | ${'tool'} | ${'phar'} | ${'1.2.3-alpha'}
|
||||||
|
${'1.2.3-beta'} | ${'tool'} | ${'phar'} | ${'1.2.3-beta'}
|
||||||
|
${'1.2.3-rc'} | ${'tool'} | ${'phar'} | ${'1.2.3-rc'}
|
||||||
|
${'1.2.3-dev'} | ${'tool'} | ${'phar'} | ${'1.2.3-dev'}
|
||||||
|
${'1.2.3-alpha1'} | ${'tool'} | ${'phar'} | ${'1.2.3-alpha1'}
|
||||||
|
${'1.2.3-alpha.1'} | ${'tool'} | ${'phar'} | ${'1.2.3-alpha.1'}
|
||||||
|
`(
|
||||||
|
'checking getVersion: $version, $tool, $type',
|
||||||
|
async ({version, tool, type, expected}) => {
|
||||||
|
expect(
|
||||||
|
await tools.getVersion(
|
||||||
|
version,
|
||||||
|
getData({tool: tool, version: version, type: type})
|
||||||
|
)
|
||||||
|
).toBe(expected);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
input | expected
|
||||||
|
${'tool'} | ${'tool'}
|
||||||
|
${'alias:1.2.3'} | ${'tool:1.2.3'}
|
||||||
|
${'tool:1.2.3'} | ${'tool:1.2.3'}
|
||||||
|
${'tool:^1.2.3'} | ${'tool:^1.2.3'}
|
||||||
|
${'tool:>=1.2.3'} | ${'tool:>=1.2.3'}
|
||||||
|
${'tool:>1.2.3'} | ${'tool:>1.2.3'}
|
||||||
|
${'tool:1.2.3-ALPHA'} | ${'tool:1.2.3-ALPHA'}
|
||||||
|
${'tool:1.2.3-beta'} | ${'tool:1.2.3-beta'}
|
||||||
|
${'tool:1.2.3-rc'} | ${'tool:1.2.3-rc'}
|
||||||
|
${'tool:1.2.3-dev'} | ${'tool:1.2.3-dev'}
|
||||||
|
${'tool:1.2.3-alpha1'} | ${'tool:1.2.3-alpha1'}
|
||||||
|
${'tool:1.2.3-alpha.1'} | ${'tool:1.2.3-alpha.1'}
|
||||||
|
${'user/tool:^1.2.3'} | ${'tool:^1.2.3'}
|
||||||
|
`('checking getRelease: $input', async ({input, expected}) => {
|
||||||
|
expect(
|
||||||
|
await tools.getRelease(input, getData({tool: 'tool', version: 'latest'}))
|
||||||
|
).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
input_list | filtered_list
|
||||||
|
${'a, b'} | ${'composer, a, b'}
|
||||||
|
${'a, b, composer'} | ${'composer, a, b'}
|
||||||
|
${'a, b, composer:1.2.3'} | ${'composer:1.2.3, a, b'}
|
||||||
|
${'a, b, composer:v1.2.3'} | ${'composer:1.2.3, a, b'}
|
||||||
|
${'a, b, composer:snapshot'} | ${'composer:snapshot, a, b'}
|
||||||
|
${'a, b, composer:preview'} | ${'composer:preview, a, b'}
|
||||||
|
${'a, b, composer:1'} | ${'composer:1, a, b'}
|
||||||
|
${'a, b, composer:2'} | ${'composer:2, a, b'}
|
||||||
|
${'a, b, composer:v1'} | ${'composer:1, a, b'}
|
||||||
|
${'a, b, composer:v2'} | ${'composer:2, a, b'}
|
||||||
|
`('checking filterList $input_list', async ({input_list, filtered_list}) => {
|
||||||
|
expect(await tools.filterList(input_list.split(', '))).toStrictEqual(
|
||||||
|
filtered_list.split(', ')
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
version | version_prefix | url_suffix
|
||||||
|
${'latest'} | ${'v'} | ${'latest/download/tool.phar'}
|
||||||
|
${'1.2.3'} | ${'v'} | ${'download/v1.2.3/tool.phar'}
|
||||||
|
${'1.2.3'} | ${''} | ${'download/1.2.3/tool.phar'}
|
||||||
|
`(
|
||||||
|
'checking getUrl: $version_prefix$version',
|
||||||
|
async ({version, version_prefix, url_suffix}) => {
|
||||||
|
const data = getData({
|
||||||
|
tool: 'tool',
|
||||||
|
version: version,
|
||||||
|
version_prefix: version_prefix
|
||||||
|
});
|
||||||
|
expect(await tools.getUrl(data)).toContain(url_suffix);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
version | version_prefix | url
|
||||||
|
${'latest'} | ${''} | ${'https://example.com/tool.phar'}
|
||||||
|
${'1.2.3'} | ${'v'} | ${'https://example.com/tool-v1.2.3.phar'}
|
||||||
|
`(
|
||||||
|
'checking getPharUrl: $version_prefix$version',
|
||||||
|
async ({version, version_prefix, url}) => {
|
||||||
|
const data = getData({
|
||||||
|
tool: 'tool',
|
||||||
|
version: version,
|
||||||
|
version_prefix: version_prefix
|
||||||
|
});
|
||||||
|
expect(await tools.getPharUrl(data)).toBe(url);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
os | script
|
||||||
|
${'linux'} | ${'add_tool https://example.com/tool.phar tool "-v"'}
|
||||||
|
${'darwin'} | ${'add_tool https://example.com/tool.phar tool "-v"'}
|
||||||
|
${'win32'} | ${'Add-Tool https://example.com/tool.phar tool "-v"'}
|
||||||
|
${'openbsd'} | ${'Platform openbsd is not supported'}
|
||||||
|
`('checking addArchive: $os', async ({os, script}) => {
|
||||||
|
const data = getData({
|
||||||
|
tool: 'tool',
|
||||||
|
version: 'latest',
|
||||||
|
version_parameter: JSON.stringify('-v'),
|
||||||
|
os: os
|
||||||
|
});
|
||||||
|
data['url'] = 'https://example.com/tool.phar';
|
||||||
|
expect(await tools.addArchive(data)).toContain(script);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
os | script | scope
|
||||||
|
${'linux'} | ${'add_composer_tool tool tool:1.2.3 user/ global'} | ${'global'}
|
||||||
|
${'darwin'} | ${'add_composer_tool tool tool:1.2.3 user/ scoped'} | ${'scoped'}
|
||||||
|
${'win32'} | ${'Add-ComposerTool tool tool:1.2.3 user/ scoped'} | ${'scoped'}
|
||||||
|
${'openbsd'} | ${'Platform openbsd is not supported'} | ${'global'}
|
||||||
|
`('checking addPackage: $os, $scope', async ({os, script, scope}) => {
|
||||||
|
const data = getData({
|
||||||
|
tool: 'tool',
|
||||||
|
version: '1.2.3',
|
||||||
|
repository: 'user/tool',
|
||||||
|
os: os,
|
||||||
|
scope: scope
|
||||||
|
});
|
||||||
|
data['release'] = [data['tool'], data['version']].join(':');
|
||||||
|
expect(await tools.addPackage(data)).toContain(script);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
version | php_version | os | script
|
||||||
|
${'latest'} | ${'7.4'} | ${'linux'} | ${'add_tool https://github.com/phar-io/phive/releases/download/3.2.1/phive-3.2.1.phar phive'}
|
||||||
|
${'1.2.3'} | ${'7.4'} | ${'darwin'} | ${'add_tool https://github.com/phar-io/phive/releases/download/1.2.3/phive-1.2.3.phar phive'}
|
||||||
|
${'1.2.3'} | ${'7.2'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.14.5/phive-0.14.5.phar phive'}
|
||||||
|
${'1.2.3'} | ${'7.1'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.13.5/phive-0.13.5.phar phive'}
|
||||||
|
${'latest'} | ${'5.6'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.12.1/phive-0.12.1.phar phive'}
|
||||||
|
${'latest'} | ${'5.5'} | ${'win32'} | ${'Phive is not supported on PHP 5.5'}
|
||||||
|
`(
|
||||||
|
'checking addPhive: $version, $php_version, $os',
|
||||||
|
async ({version, php_version, os, script}) => {
|
||||||
|
const data = getData({
|
||||||
|
tool: 'phive',
|
||||||
|
repository: 'phar-io/phive',
|
||||||
|
version_parameter: 'status',
|
||||||
|
version: version,
|
||||||
|
php_version: php_version,
|
||||||
|
os: os
|
||||||
|
});
|
||||||
|
script = await tools.addPhive(data);
|
||||||
|
expect(script).toContain(script);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
os | version | php_version | url
|
||||||
|
${'linux'} | ${'latest'} | ${'8.1'} | ${'https://get.blackfire.io/blackfire-player.phar'}
|
||||||
|
${'linux'} | ${'1.2.3'} | ${'7.4'} | ${'https://get.blackfire.io/blackfire-player-v1.2.3.phar'}
|
||||||
|
${'linux'} | ${'latest'} | ${'7.4'} | ${'https://get.blackfire.io/blackfire-player-v1.22.0.phar'}
|
||||||
|
${'linux'} | ${'latest'} | ${'5.5'} | ${'https://get.blackfire.io/blackfire-player-v1.9.3.phar'}
|
||||||
|
${'linux'} | ${'latest'} | ${'7.0'} | ${'https://get.blackfire.io/blackfire-player-v1.9.3.phar'}
|
||||||
|
${'win32'} | ${'latest'} | ${'7.0'} | ${'blackfire-player is not a windows tool'}
|
||||||
|
`(
|
||||||
|
'checking addBlackfirePlayer: $os, $version, $php_version',
|
||||||
|
async ({os, version, php_version, url}) => {
|
||||||
|
const data = getData({
|
||||||
|
os: os,
|
||||||
|
tool: 'blackfire-player',
|
||||||
|
domain: 'https://get.blackfire.io',
|
||||||
|
version_prefix: 'v',
|
||||||
|
version: version,
|
||||||
|
php_version: php_version
|
||||||
|
});
|
||||||
|
expect(await tools.addBlackfirePlayer(data)).toContain(url);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
version | url
|
||||||
|
${'latest'} | ${'https://deployer.org/deployer.phar'}
|
||||||
|
${'1.2.3'} | ${'https://deployer.org/releases/v1.2.3/deployer.phar'}
|
||||||
|
${'3.2.1'} | ${'Version missing in deployer manifest'}
|
||||||
|
`('checking addDeployer: $version', async ({version, url}) => {
|
||||||
|
const data = getData({
|
||||||
|
tool: 'deployer',
|
||||||
|
domain: 'https://deployer.org',
|
||||||
|
version: version
|
||||||
|
});
|
||||||
|
expect(await tools.addDeployer(data)).toContain(url);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
version | php_version | no_tool_cache | cache_url | source_url
|
||||||
|
${'latest'} | ${'7.4'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
|
||||||
|
${'stable'} | ${'7.4'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
|
||||||
|
${'snapshot'} | ${'7.4'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-snapshot.phar'} | ${'https://getcomposer.org/composer.phar'}
|
||||||
|
${'preview'} | ${'7.4'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-preview.phar'} | ${'https://getcomposer.org/composer-preview.phar'}
|
||||||
|
${'1'} | ${'7.4'} | ${'false'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
|
||||||
|
${'2'} | ${'7.4'} | ${'false'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-2.phar'} | ${'https://getcomposer.org/composer-2.phar'}
|
||||||
|
${'latest'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
|
||||||
|
${'stable'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
|
||||||
|
${'snapshot'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-snapshot.phar'} | ${'https://getcomposer.org/composer.phar'}
|
||||||
|
${'preview'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-preview.phar'} | ${'https://getcomposer.org/composer-preview.phar'}
|
||||||
|
${'1'} | ${'7.4'} | ${'false'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
|
||||||
|
${'2'} | ${'7.4'} | ${'false'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-2.phar'} | ${'https://getcomposer.org/composer-2.phar'}
|
||||||
|
${'latest'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-stable.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
||||||
|
${'stable'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-stable.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
||||||
|
${'snapshot'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-snapshot.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
||||||
|
${'preview'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-preview.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
||||||
|
${'1'} | ${'7.1'} | ${'false'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
|
||||||
|
${'2'} | ${'7.1'} | ${'false'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-2.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
||||||
|
${'1.2.3'} | ${'7.4'} | ${'false'} | ${'https://github.com/composer/composer/releases/download/1.2.3/composer.phar'} | ${'https://getcomposer.org/composer-1.2.3.phar'}
|
||||||
|
${'1.2.3-RC1'} | ${'7.4'} | ${'false'} | ${'https://github.com/composer/composer/releases/download/1.2.3-RC1/composer.phar'} | ${'https://getcomposer.org/composer-1.2.3-RC1.phar'}
|
||||||
|
`(
|
||||||
|
'checking addComposer: $version, $php_version, $no_tool_cache',
|
||||||
|
async ({version, php_version, no_tool_cache, cache_url, source_url}) => {
|
||||||
|
const data = getData({
|
||||||
|
tool: 'composer',
|
||||||
|
php_version: php_version,
|
||||||
|
domain: 'https://getcomposer.org',
|
||||||
|
repository: 'composer/composer',
|
||||||
|
version: version
|
||||||
|
});
|
||||||
|
process.env['no_tools_cache'] = no_tool_cache;
|
||||||
|
expect(await tools.addComposer(data)).toContain(source_url);
|
||||||
|
if (no_tool_cache !== 'true') {
|
||||||
|
expect(await tools.addComposer(data)).toContain(cache_url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
version | uri
|
||||||
|
${'latest'} | ${'wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true'}
|
||||||
|
${'1.2.3'} | ${'wp-cli/wp-cli/releases/download/v1.2.3/wp-cli-1.2.3.phar'}
|
||||||
|
`('checking addWPCLI: $version', async ({version, uri}) => {
|
||||||
|
const data = getData({
|
||||||
|
tool: 'wp-cli',
|
||||||
|
repository: 'wp-cli/wp-cli',
|
||||||
|
php_version: '7.4',
|
||||||
|
version_prefix: 'v',
|
||||||
|
version: version
|
||||||
|
});
|
||||||
|
expect(await tools.addWPCLI(data)).toContain(uri);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
tool | os | script
|
||||||
|
${'phpize'} | ${'linux'} | ${'add_devtools phpize'}
|
||||||
|
${'php-config'} | ${'linux'} | ${'add_devtools php-config'}
|
||||||
|
${'phpize'} | ${'darwin'} | ${'add_devtools phpize'}
|
||||||
|
${'php-config'} | ${'darwin'} | ${'add_devtools php-config'}
|
||||||
|
${'phpize'} | ${'win32'} | ${'Add-Log "$tick" "phpize" "phpize is not a windows tool"'}
|
||||||
|
${'php-config'} | ${'win32'} | ${'Add-Log "$tick" "php-config" "php-config is not a windows tool"'}
|
||||||
|
${'phpize'} | ${'openbsd'} | ${'Platform openbsd is not supported'}
|
||||||
|
`('checking addDevTools: $tool, $os', async ({tool, os, script}) => {
|
||||||
|
const data = getData({
|
||||||
|
version: '7.4',
|
||||||
|
tool: tool,
|
||||||
|
os: os
|
||||||
|
});
|
||||||
|
expect(await tools.addDevTools(data)).toContain(script);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
'blackfire, blackfire-player, box, churn, cs2pr, flex, grpc_php_plugin, parallel-lint, php-cs-fixer, php-scoper, phpDocumentor, phplint, phpstan, phpunit, pecl, phing, phinx, phinx:1.2.3, phive, phpunit-bridge, phpunit-polyfills, pint, php-config, phpize, protoc, symfony, vapor, wp',
|
||||||
|
[
|
||||||
|
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
|
||||||
|
'add_blackfire',
|
||||||
|
'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"',
|
||||||
|
'add_tool https://github.com/box-project/box/releases/latest/download/box.phar box "--version"',
|
||||||
|
'add_tool https://github.com/bmitch/churn-php/releases/latest/download/churn.phar churn "-V"',
|
||||||
|
'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr "-V"',
|
||||||
|
'add_composer_tool flex flex symfony/ global',
|
||||||
|
'add_grpc_php_plugin latest',
|
||||||
|
'add_tool https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/latest/download/parallel-lint.phar parallel-lint "--version"',
|
||||||
|
'add_tool https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.2.1/php-cs-fixer.phar php-cs-fixer "-V"',
|
||||||
|
'add_tool https://github.com/humbug/php-scoper/releases/latest/download/php-scoper.phar php-scoper "--version"',
|
||||||
|
'add_tool https://github.com/phpDocumentor/phpDocumentor/releases/latest/download/phpDocumentor.phar phpDocumentor "--version"',
|
||||||
|
'add_composer_tool phplint phplint overtrue/',
|
||||||
|
'add_tool https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar phpstan "-V"',
|
||||||
|
'add_tool https://phar.phpunit.de/phpunit-7.4.0.phar phpunit "--version"',
|
||||||
|
'add_pecl',
|
||||||
|
'add_tool https://www.phing.info/get/phing-latest.phar phing "-v"',
|
||||||
|
'add_composer_tool phinx phinx robmorgan/ scoped',
|
||||||
|
'add_composer_tool phinx phinx:1.2.3 robmorgan/ scoped',
|
||||||
|
'add_tool https://github.com/phar-io/phive/releases/download/3.2.1/phive-3.2.1.phar phive "status"',
|
||||||
|
'add_composer_tool phpunit-bridge phpunit-bridge symfony/ global',
|
||||||
|
'add_composer_tool phpunit-polyfills phpunit-polyfills yoast/ global',
|
||||||
|
'add_tool https://github.com/laravel/pint/releases/latest/download/pint.phar pint "-V"',
|
||||||
|
'add_devtools php-config',
|
||||||
|
'add_devtools phpize',
|
||||||
|
'add_protoc latest',
|
||||||
|
'add_symfony latest',
|
||||||
|
'add_composer_tool vapor-cli vapor-cli laravel/ scoped',
|
||||||
|
'add_tool https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true wp-cli "--version"'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
])('checking addTools on linux', async (tools_csv, scripts) => {
|
||||||
|
const expected = await tools.addTools(tools_csv, '7.4', 'linux');
|
||||||
|
scripts.forEach(script => {
|
||||||
|
expect(expected).toContain(script);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
'behat, blackfire, blackfire-player, churn, composer-normalize, composer-require-checker, composer-unused, cs2pr:1.2.3, flex, grpc_php_plugin:1.2.3, infection, phan, phan:1.2.3, phing:1.2.3, phinx, phive:1.2.3, php-config, phpcbf, phpcpd, phpcs, phpdoc, phpize, phpmd, phpspec, phpunit-bridge:5.6, phpunit-polyfills:1.0.1, protoc:v1.2.3, psalm, rector, symfony-cli, vapor-cli, wp-cli',
|
||||||
|
[
|
||||||
|
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
|
||||||
|
'add_composer_tool behat behat behat/ scoped',
|
||||||
|
'add_blackfire',
|
||||||
|
'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"',
|
||||||
|
'add_tool https://github.com/bmitch/churn-php/releases/latest/download/churn.phar churn "-V"',
|
||||||
|
'add_tool https://github.com/ergebnis/composer-normalize/releases/latest/download/composer-normalize.phar composer-normalize "-V"',
|
||||||
|
'add_composer_tool composer-require-checker composer-require-checker maglnet/ scoped',
|
||||||
|
'add_tool https://github.com/composer-unused/composer-unused/releases/latest/download/composer-unused.phar composer-unused "-V"',
|
||||||
|
'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/download/1.2.3/cs2pr cs2pr "-V"',
|
||||||
|
'add_composer_tool flex flex symfony/ global',
|
||||||
|
'add_grpc_php_plugin 1.2.3',
|
||||||
|
'add_tool https://github.com/infection/infection/releases/latest/download/infection.phar infection "-V"',
|
||||||
|
'add_tool https://github.com/phan/phan/releases/latest/download/phan.phar phan "-v"',
|
||||||
|
'add_tool https://github.com/phan/phan/releases/download/1.2.3/phan.phar phan "-v"',
|
||||||
|
'add_tool https://www.phing.info/get/phing-1.2.3.phar,https://github.com/phingofficial/phing/releases/download/1.2.3/phing-1.2.3.phar phing "-v"',
|
||||||
|
'add_composer_tool phinx phinx robmorgan/ scoped',
|
||||||
|
'add_tool https://github.com/phar-io/phive/releases/download/1.2.3/phive-1.2.3.phar phive',
|
||||||
|
'add_devtools php-config',
|
||||||
|
'add_tool https://github.com/squizlabs/PHP_CodeSniffer/releases/latest/download/phpcbf.phar phpcbf "--version"',
|
||||||
|
'add_tool https://phar.phpunit.de/phpcpd.phar phpcpd "--version"',
|
||||||
|
'add_tool https://github.com/squizlabs/PHP_CodeSniffer/releases/latest/download/phpcs.phar phpcs "--version"',
|
||||||
|
'add_tool https://github.com/phpDocumentor/phpDocumentor/releases/latest/download/phpDocumentor.phar phpDocumentor "--version"',
|
||||||
|
'add_devtools phpize',
|
||||||
|
'add_tool https://github.com/phpmd/phpmd/releases/latest/download/phpmd.phar phpmd "--version"',
|
||||||
|
'add_tool https://github.com/phpspec/phpspec/releases/latest/download/phpspec.phar phpspec "-V"',
|
||||||
|
'add_composer_tool phpunit-bridge phpunit-bridge:5.6.* symfony/ global',
|
||||||
|
'add_composer_tool phpunit-polyfills phpunit-polyfills:1.0.1 yoast/ global',
|
||||||
|
'add_protoc 1.2.3',
|
||||||
|
'add_tool https://github.com/vimeo/psalm/releases/latest/download/psalm.phar psalm "-v"',
|
||||||
|
'add_composer_tool rector rector rector/ scoped',
|
||||||
|
'add_symfony latest',
|
||||||
|
'add_composer_tool vapor-cli vapor-cli laravel/ scoped',
|
||||||
|
'add_tool https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true wp-cli "--version"'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
])('checking addTools on darwin', async (tools_csv, scripts) => {
|
||||||
|
const expected = await tools.addTools(tools_csv, '7.4', 'darwin');
|
||||||
|
scripts.forEach(script => {
|
||||||
|
expect(expected).toContain(script);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
'blackfire, blackfire-player:1.2.3, cs2pr, churn, deployer, does_not_exist, flex, phinx, phive:0.13.2, php-config, phpize, phpmd, simple-phpunit, symfony, wp',
|
||||||
|
[
|
||||||
|
'Add-Tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
|
||||||
|
'Add-Blackfire',
|
||||||
|
'blackfire-player is not a windows tool',
|
||||||
|
'Add-Tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr "-V"',
|
||||||
|
'Add-Tool https://github.com/bmitch/churn-php/releases/latest/download/churn.phar churn "-V"',
|
||||||
|
'Add-Tool https://deployer.org/deployer.phar deployer "-V"',
|
||||||
|
'Tool does_not_exist is not supported',
|
||||||
|
'Add-ComposerTool flex flex symfony/ global',
|
||||||
|
'Add-ComposerTool phinx phinx robmorgan/ scoped',
|
||||||
|
'Add-Tool https://github.com/phar-io/phive/releases/download/0.13.2/phive-0.13.2.phar phive "status"',
|
||||||
|
'php-config is not a windows tool',
|
||||||
|
'phpize is not a windows tool',
|
||||||
|
'Add-Tool https://github.com/phpmd/phpmd/releases/latest/download/phpmd.phar phpmd "--version"',
|
||||||
|
'Add-ComposerTool phpunit-bridge phpunit-bridge symfony/ global',
|
||||||
|
'Add-Symfony',
|
||||||
|
'Add-Tool https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true wp-cli "--version"'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
])('checking addTools on Windows', async (tools_csv, scripts) => {
|
||||||
|
const expected = await tools.addTools(tools_csv, '7.4', 'win32');
|
||||||
|
scripts.forEach(script => {
|
||||||
|
expect(expected).toContain(script);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[
|
||||||
|
'composer:v1, codeception/codeception, prestissimo, hirak/prestissimo, composer-prefetcher, narrowspark/automatic-composer-prefetcher, phinx: 1.2, robmorgan/phinx: ^1.2, user/tool:1.2.3, user/tool:~1.2',
|
||||||
|
[
|
||||||
|
'Add-Tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar,https://getcomposer.org/composer-1.phar composer',
|
||||||
|
'Add-ComposerTool codeception codeception codeception/ global',
|
||||||
|
'Add-ComposerTool prestissimo prestissimo hirak/ global',
|
||||||
|
'Add-ComposerTool automatic-composer-prefetcher automatic-composer-prefetcher narrowspark/ global',
|
||||||
|
'Add-ComposerTool phinx phinx:1.2.* robmorgan/ scoped',
|
||||||
|
'Add-ComposerTool phinx phinx:^1.2 robmorgan/ global',
|
||||||
|
'Add-ComposerTool tool tool:1.2.3 user/ global',
|
||||||
|
'Add-ComposerTool tool tool:~1.2 user/ global'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
])(
|
||||||
|
'checking addTools with composer tool using user/tool as input',
|
||||||
|
async (tools_csv, scripts) => {
|
||||||
|
const expected = await tools.addTools(tools_csv, '7.4', 'win32');
|
||||||
|
scripts.forEach(script => {
|
||||||
|
expect(expected).toContain(script);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
version | os | uri
|
||||||
|
${'latest'} | ${'linux'} | ${'releases/latest/download/castor.linux-amd64.phar'}
|
||||||
|
${'0.5.1'} | ${'linux'} | ${'releases/download/v0.5.1/castor.linux-amd64.phar'}
|
||||||
|
${'latest'} | ${'darwin'} | ${'releases/latest/download/castor.darwin-amd64.phar'}
|
||||||
|
${'0.5.1'} | ${'darwin'} | ${'releases/download/v0.5.1/castor.darwin-amd64.phar'}
|
||||||
|
${'latest'} | ${'win32'} | ${'releases/latest/download/castor.windows-amd64.phar'}
|
||||||
|
${'0.5.1'} | ${'win32'} | ${'releases/download/v0.5.1/castor.windows-amd64.phar castor -V'}
|
||||||
|
${'latest'} | ${'openbsd'} | ${'Platform openbsd is not supported'}
|
||||||
|
`('checking addCastor: $version, $os', async ({version, os, uri}) => {
|
||||||
|
const data = getData({
|
||||||
|
tool: 'castor',
|
||||||
|
php_version: '8.1',
|
||||||
|
version_prefix: 'v',
|
||||||
|
version: version,
|
||||||
|
os: os
|
||||||
|
});
|
||||||
|
if (os === 'win32' && version === '0.5.1') {
|
||||||
|
fs.writeFileSync('castor.php', '');
|
||||||
|
expect(await tools.addCastor(data)).toContain(uri);
|
||||||
|
fs.unlinkSync('castor.php');
|
||||||
|
} else {
|
||||||
|
expect(await tools.addCastor(data)).toContain(uri);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
tools_csv | script
|
||||||
|
${'none'} | ${''}
|
||||||
|
${'none, phpunit'} | ${'\nstep_log "Setup Tools"\nadd_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer latest\n\nadd_tool https://phar.phpunit.de/phpunit-7.4.0.phar phpunit "--version"'}
|
||||||
|
${'composer:preview'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-preview.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-preview.phar,https://getcomposer.org/composer-preview.phar composer preview'}
|
||||||
|
${'composer, composer:v1'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar,https://getcomposer.org/composer-1.phar composer'}
|
||||||
|
${'composer:v1, composer:preview, composer:snapshot'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-snapshot.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-snapshot.phar,https://getcomposer.org/composer.phar composer snapshot'}
|
||||||
|
`('checking composer setup: $tools_csv', async ({tools_csv, script}) => {
|
||||||
|
expect(await tools.addTools(tools_csv, '7.4', 'linux')).toContain(script);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
tools_csv | token | script
|
||||||
|
${'cs2pr:1.2'} | ${'invalid_token'} | ${'add_log "$cross" "cs2pr" "Invalid token"'}
|
||||||
|
${'phpunit:1.2'} | ${'invalid_token'} | ${'add_log "$cross" "phpunit" "Invalid token"'}
|
||||||
|
${'phpunit:0.1'} | ${'no_data'} | ${'add_log "$cross" "phpunit" "No version found with prefix 0.1."'}
|
||||||
|
`('checking error: $tools_csv', async ({tools_csv, token, script}) => {
|
||||||
|
process.env['COMPOSER_TOKEN'] = token;
|
||||||
|
expect(await tools.addTools(tools_csv, '7.4', 'linux')).toContain(script);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
tools_csv | token | script
|
||||||
|
${'cs2pr:1.2'} | ${'invalid_token'} | ${'add_log "$cross" "cs2pr" "Invalid token"'}
|
||||||
|
${'phpunit:1.2'} | ${'invalid_token'} | ${'add_log "$cross" "phpunit" "Invalid token"'}
|
||||||
|
${'phpunit:0.1'} | ${'no_data'} | ${'add_log "$cross" "phpunit" "No version found with prefix 0.1."'}
|
||||||
|
`('checking error: $tools_csv', async ({tools_csv, token, script}) => {
|
||||||
|
process.env['GITHUB_TOKEN'] = token;
|
||||||
|
expect(await tools.addTools(tools_csv, '7.4', 'linux')).toContain(script);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each`
|
||||||
|
tools_csv | php_version | resolved
|
||||||
|
${'phpunit'} | ${'8.2'} | ${'/phpunit-8.2.0.phar'}
|
||||||
|
${'phpunit'} | ${'8.1'} | ${'/phpunit-8.1.0.phar'}
|
||||||
|
${'phpunit'} | ${'8.0'} | ${'/phpunit-8.0.0.phar'}
|
||||||
|
${'phpunit'} | ${'7.3'} | ${'/phpunit-7.3.0.phar'}
|
||||||
|
${'phpunit'} | ${'7.2'} | ${'/phpunit-7.2.0.phar'}
|
||||||
|
${'phpunit'} | ${'7.1'} | ${'/phpunit-7.1.0.phar'}
|
||||||
|
${'phpunit'} | ${'7.0'} | ${'/phpunit-7.0.0.phar'}
|
||||||
|
`(
|
||||||
|
'checking error: $tools_csv',
|
||||||
|
async ({tools_csv, php_version, resolved}) => {
|
||||||
|
expect(await tools.addTools(tools_csv, php_version, 'linux')).toContain(
|
||||||
|
resolved
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,315 @@
|
|||||||
|
import fs = require('fs');
|
||||||
|
import * as path from 'path';
|
||||||
|
import * as utils from '../src/utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mock @actions/core
|
||||||
|
*/
|
||||||
|
jest.mock('@actions/core', () => ({
|
||||||
|
getInput: jest.fn().mockImplementation(key => {
|
||||||
|
return ['setup-php'].indexOf(key) !== -1 ? key : '';
|
||||||
|
}),
|
||||||
|
info: jest.fn()
|
||||||
|
}));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mock fetch.ts
|
||||||
|
*/
|
||||||
|
jest.mock('../src/fetch', () => ({
|
||||||
|
fetch: jest.fn().mockImplementation(() => {
|
||||||
|
return {data: '{ "latest": "8.1", "5.x": "5.6" }'};
|
||||||
|
})
|
||||||
|
}));
|
||||||
|
|
||||||
|
describe('Utils tests', () => {
|
||||||
|
it('checking readEnv', async () => {
|
||||||
|
process.env['test'] = 'setup-php';
|
||||||
|
process.env['test-hyphen'] = 'setup-php';
|
||||||
|
expect(await utils.readEnv('test')).toBe('setup-php');
|
||||||
|
expect(await utils.readEnv('TEST')).toBe('setup-php');
|
||||||
|
expect(await utils.readEnv('test_hyphen')).toBe('setup-php');
|
||||||
|
expect(await utils.readEnv('TEST_HYPHEN')).toBe('setup-php');
|
||||||
|
expect(await utils.readEnv('undefined')).toBe('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking getInput', async () => {
|
||||||
|
process.env['test'] = 'setup-php';
|
||||||
|
expect(await utils.getInput('test', false)).toBe('setup-php');
|
||||||
|
expect(await utils.getInput('setup-php', false)).toBe('setup-php');
|
||||||
|
expect(await utils.getInput('DoesNotExist', false)).toBe('');
|
||||||
|
await expect(async () => {
|
||||||
|
await utils.getInput('DoesNotExist', true);
|
||||||
|
}).rejects.toThrow('Input required and not supplied: DoesNotExist');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking getManifestURL', async () => {
|
||||||
|
expect(await utils.getManifestURL()).toContain('php-versions.json');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking parseVersion', async () => {
|
||||||
|
expect(await utils.parseVersion('latest')).toBe('8.1');
|
||||||
|
expect(await utils.parseVersion('7')).toBe('7.0');
|
||||||
|
expect(await utils.parseVersion('7.4')).toBe('7.4');
|
||||||
|
expect(await utils.parseVersion('5.x')).toBe('5.6');
|
||||||
|
expect(await utils.parseVersion('4.x')).toBe(undefined);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking parseIniFile', async () => {
|
||||||
|
expect(await utils.parseIniFile('production')).toBe('production');
|
||||||
|
expect(await utils.parseIniFile('development')).toBe('development');
|
||||||
|
expect(await utils.parseIniFile('none')).toBe('none');
|
||||||
|
expect(await utils.parseIniFile('php.ini-production')).toBe('production');
|
||||||
|
expect(await utils.parseIniFile('php.ini-development')).toBe('development');
|
||||||
|
expect(await utils.parseIniFile('invalid')).toBe('production');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking asyncForEach', async () => {
|
||||||
|
const array: Array<string> = ['a', 'b', 'c'];
|
||||||
|
let concat = '';
|
||||||
|
await utils.asyncForEach(
|
||||||
|
array,
|
||||||
|
async function (str: string): Promise<void> {
|
||||||
|
concat += str;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
expect(concat).toBe('abc');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking asyncForEach', async () => {
|
||||||
|
expect(await utils.color('error')).toBe('31');
|
||||||
|
expect(await utils.color('success')).toBe('32');
|
||||||
|
expect(await utils.color('any')).toBe('32');
|
||||||
|
expect(await utils.color('warning')).toBe('33');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking extensionArray', async () => {
|
||||||
|
expect(
|
||||||
|
await utils.extensionArray('a, :b, php_c, none, php-d, Zend e, :Zend f')
|
||||||
|
).toEqual(['none', 'a', ':b', 'c', 'd', 'e', ':f']);
|
||||||
|
|
||||||
|
expect(await utils.extensionArray('')).toEqual([]);
|
||||||
|
expect(await utils.extensionArray(' ')).toEqual([]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking INIArray', async () => {
|
||||||
|
expect(await utils.CSVArray('a=1, b=2, c=3')).toEqual([
|
||||||
|
'a=1',
|
||||||
|
'b=2',
|
||||||
|
'c=3'
|
||||||
|
]);
|
||||||
|
expect(await utils.CSVArray('\'a=1,2\', "b=3, 4", c=5, d=~e~')).toEqual([
|
||||||
|
'a=1,2',
|
||||||
|
'b=3, 4',
|
||||||
|
'c=5',
|
||||||
|
"d='~e~'"
|
||||||
|
]);
|
||||||
|
expect(await utils.CSVArray('a=\'1,2\', b="3, 4", c=5')).toEqual([
|
||||||
|
'a=1,2',
|
||||||
|
'b=3, 4',
|
||||||
|
'c=5'
|
||||||
|
]);
|
||||||
|
expect(
|
||||||
|
await utils.CSVArray('a=E_ALL, b=E_ALL & ~ E_ALL, c="E_ALL", d=\'E_ALL\'')
|
||||||
|
).toEqual(['a=E_ALL', 'b=E_ALL & ~ E_ALL', 'c=E_ALL', 'd=E_ALL']);
|
||||||
|
expect(
|
||||||
|
await utils.CSVArray('a="b=c;d=e", b=\'c=d,e\', c="g=h,i=j", d=g=h, a===')
|
||||||
|
).toEqual(["a='b=c;d=e'", "b='c=d,e'", "c='g=h,i=j'", "d='g=h'", "a='=='"]);
|
||||||
|
expect(await utils.CSVArray('')).toEqual([]);
|
||||||
|
expect(await utils.CSVArray(' ')).toEqual([]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking log', async () => {
|
||||||
|
const message = 'Test message';
|
||||||
|
|
||||||
|
let warning_log: string = await utils.log(message, 'win32', 'warning');
|
||||||
|
expect(warning_log).toEqual('printf "\\033[33;1m' + message + ' \\033[0m"');
|
||||||
|
warning_log = await utils.log(message, 'linux', 'warning');
|
||||||
|
expect(warning_log).toEqual('echo "\\033[33;1m' + message + '\\033[0m"');
|
||||||
|
warning_log = await utils.log(message, 'darwin', 'warning');
|
||||||
|
expect(warning_log).toEqual('echo "\\033[33;1m' + message + '\\033[0m"');
|
||||||
|
|
||||||
|
let error_log: string = await utils.log(message, 'win32', 'error');
|
||||||
|
expect(error_log).toEqual('printf "\\033[31;1m' + message + ' \\033[0m"');
|
||||||
|
error_log = await utils.log(message, 'linux', 'error');
|
||||||
|
expect(error_log).toEqual('echo "\\033[31;1m' + message + '\\033[0m"');
|
||||||
|
error_log = await utils.log(message, 'darwin', 'error');
|
||||||
|
expect(error_log).toEqual('echo "\\033[31;1m' + message + '\\033[0m"');
|
||||||
|
|
||||||
|
let success_log: string = await utils.log(message, 'win32', 'success');
|
||||||
|
expect(success_log).toEqual('printf "\\033[32;1m' + message + ' \\033[0m"');
|
||||||
|
success_log = await utils.log(message, 'linux', 'success');
|
||||||
|
expect(success_log).toEqual('echo "\\033[32;1m' + message + '\\033[0m"');
|
||||||
|
success_log = await utils.log(message, 'darwin', 'success');
|
||||||
|
expect(success_log).toEqual('echo "\\033[32;1m' + message + '\\033[0m"');
|
||||||
|
|
||||||
|
let step_log: string = await utils.stepLog(message, 'win32');
|
||||||
|
expect(step_log).toEqual('Step-Log "Test message"');
|
||||||
|
step_log = await utils.stepLog(message, 'linux');
|
||||||
|
expect(step_log).toEqual('step_log "Test message"');
|
||||||
|
step_log = await utils.stepLog(message, 'darwin');
|
||||||
|
expect(step_log).toEqual('step_log "Test message"');
|
||||||
|
step_log = await utils.stepLog(message, 'openbsd');
|
||||||
|
expect(step_log).toContain('Platform openbsd is not supported');
|
||||||
|
|
||||||
|
let add_log: string = await utils.addLog(
|
||||||
|
'tick',
|
||||||
|
'xdebug',
|
||||||
|
'enabled',
|
||||||
|
'win32'
|
||||||
|
);
|
||||||
|
expect(add_log).toEqual('Add-Log "tick" "xdebug" "enabled"');
|
||||||
|
add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'linux');
|
||||||
|
expect(add_log).toEqual('add_log "tick" "xdebug" "enabled"');
|
||||||
|
add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'darwin');
|
||||||
|
expect(add_log).toEqual('add_log "tick" "xdebug" "enabled"');
|
||||||
|
add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'openbsd');
|
||||||
|
expect(add_log).toContain('Platform openbsd is not supported');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking getExtensionPrefix', async () => {
|
||||||
|
expect(await utils.getExtensionPrefix('extensionDoesNotExist')).toEqual(
|
||||||
|
'extension'
|
||||||
|
);
|
||||||
|
expect(await utils.getExtensionPrefix('xsl')).toEqual('extension');
|
||||||
|
expect(await utils.getExtensionPrefix('xdebug')).toEqual('zend_extension');
|
||||||
|
expect(await utils.getExtensionPrefix('xdebug3')).toEqual('zend_extension');
|
||||||
|
expect(await utils.getExtensionPrefix('opcache')).toEqual('zend_extension');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking suppressOutput', async () => {
|
||||||
|
expect(await utils.suppressOutput('win32')).toEqual(' >$null 2>&1');
|
||||||
|
expect(await utils.suppressOutput('linux')).toEqual(' >/dev/null 2>&1');
|
||||||
|
expect(await utils.suppressOutput('darwin')).toEqual(' >/dev/null 2>&1');
|
||||||
|
expect(await utils.suppressOutput('openbsd')).toContain(
|
||||||
|
'Platform openbsd is not supported'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking getUnsupportedLog', async () => {
|
||||||
|
expect(await utils.getUnsupportedLog('ext', '5.6', 'linux')).toContain(
|
||||||
|
'add_log "$cross" "ext" "ext is not supported on PHP 5.6"'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking getCommand', async () => {
|
||||||
|
expect(await utils.getCommand('linux', 'tool')).toBe('add_tool ');
|
||||||
|
expect(await utils.getCommand('darwin', 'tool')).toBe('add_tool ');
|
||||||
|
expect(await utils.getCommand('win32', 'tool')).toBe('Add-Tool ');
|
||||||
|
expect(await utils.getCommand('win32', 'tool_name')).toBe('Add-ToolName ');
|
||||||
|
expect(await utils.getCommand('openbsd', 'tool')).toContain(
|
||||||
|
'Platform openbsd is not supported'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking joins', async () => {
|
||||||
|
expect(await utils.joins('a', 'b', 'c')).toBe('a b c');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking scriptExtension', async () => {
|
||||||
|
expect(await utils.scriptExtension('linux')).toBe('.sh');
|
||||||
|
expect(await utils.scriptExtension('darwin')).toBe('.sh');
|
||||||
|
expect(await utils.scriptExtension('win32')).toBe('.ps1');
|
||||||
|
expect(await utils.scriptExtension('openbsd')).toContain(
|
||||||
|
'Platform openbsd is not supported'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking scriptTool', async () => {
|
||||||
|
expect(await utils.scriptTool('linux')).toBe('bash ');
|
||||||
|
expect(await utils.scriptTool('darwin')).toBe('bash ');
|
||||||
|
expect(await utils.scriptTool('win32')).toBe('pwsh ');
|
||||||
|
expect(await utils.scriptTool('openbsd')).toContain(
|
||||||
|
'Platform openbsd is not supported'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking customPackage', async () => {
|
||||||
|
const script_path: string = path.join('ext', 'pkg.sh');
|
||||||
|
expect(await utils.customPackage('pkg', 'ext', '1.2.3', 'linux')).toContain(
|
||||||
|
script_path + '\nadd_pkg 1.2.3'
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
await utils.customPackage('pdo_pkg', 'ext', '1.2.3', 'linux')
|
||||||
|
).toContain(script_path + '\nadd_pkg 1.2.3');
|
||||||
|
expect(
|
||||||
|
await utils.customPackage('pkg8', 'ext', '1.2.3', 'linux')
|
||||||
|
).toContain(script_path + '\nadd_pkg 1.2.3');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking parseExtensionSource', async () => {
|
||||||
|
expect(
|
||||||
|
await utils.parseExtensionSource(
|
||||||
|
'ext-org-name/repo-name@release',
|
||||||
|
'extension'
|
||||||
|
)
|
||||||
|
).toContain(
|
||||||
|
'\nadd_extension_from_source ext https://github.com org-name repo-name release extension'
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
await utils.parseExtensionSource(
|
||||||
|
'ext-https://sub.domain.tld/org/repo@release',
|
||||||
|
'extension'
|
||||||
|
)
|
||||||
|
).toContain(
|
||||||
|
'\nadd_extension_from_source ext https://sub.domain.tld org repo release extension'
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
await utils.parseExtensionSource(
|
||||||
|
'ext-https://sub.domain.XN--tld/org/repo@release',
|
||||||
|
'extension'
|
||||||
|
)
|
||||||
|
).toContain(
|
||||||
|
'\nadd_extension_from_source ext https://sub.domain.XN--tld org repo release extension'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking readPHPVersion', async () => {
|
||||||
|
expect(await utils.readPHPVersion()).toBe('latest');
|
||||||
|
|
||||||
|
process.env['php-version-file'] = '.phpenv-version';
|
||||||
|
await expect(utils.readPHPVersion()).rejects.toThrow(
|
||||||
|
"Could not find '.phpenv-version' file."
|
||||||
|
);
|
||||||
|
|
||||||
|
const existsSync = jest.spyOn(fs, 'existsSync').mockImplementation();
|
||||||
|
const readFileSync = jest.spyOn(fs, 'readFileSync').mockImplementation();
|
||||||
|
|
||||||
|
existsSync.mockReturnValue(true);
|
||||||
|
readFileSync.mockReturnValue('8.1');
|
||||||
|
|
||||||
|
expect(await utils.readPHPVersion()).toBe('8.1');
|
||||||
|
|
||||||
|
process.env['php-version'] = '8.2';
|
||||||
|
expect(await utils.readPHPVersion()).toBe('8.2');
|
||||||
|
|
||||||
|
delete process.env['php-version-file'];
|
||||||
|
delete process.env['php-version'];
|
||||||
|
|
||||||
|
existsSync.mockReturnValueOnce(false).mockReturnValueOnce(true);
|
||||||
|
readFileSync.mockReturnValue(
|
||||||
|
'{ "platform-overrides": { "php": "7.3.25" } }'
|
||||||
|
);
|
||||||
|
expect(await utils.readPHPVersion()).toBe('7.3.25');
|
||||||
|
|
||||||
|
existsSync
|
||||||
|
.mockReturnValueOnce(false)
|
||||||
|
.mockReturnValueOnce(false)
|
||||||
|
.mockReturnValueOnce(true);
|
||||||
|
readFileSync.mockReturnValue(
|
||||||
|
'{ "config": { "platform": { "php": "7.4.33" } } }'
|
||||||
|
);
|
||||||
|
expect(await utils.readPHPVersion()).toBe('7.4.33');
|
||||||
|
|
||||||
|
existsSync.mockClear();
|
||||||
|
readFileSync.mockClear();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking setVariable', async () => {
|
||||||
|
let script: string = await utils.setVariable('var', 'command', 'linux');
|
||||||
|
expect(script).toEqual('\nvar="$(command)"\n');
|
||||||
|
script = await utils.setVariable('var', 'command', 'darwin');
|
||||||
|
expect(script).toEqual('\nvar="$(command)"\n');
|
||||||
|
script = await utils.setVariable('var', 'command', 'win32');
|
||||||
|
expect(script).toEqual('\n$var = command\n');
|
||||||
|
});
|
||||||
|
});
|
||||||
+28
-5
@@ -1,12 +1,35 @@
|
|||||||
name: 'Setup PHP Action'
|
name: 'Setup PHP Action'
|
||||||
author: shivammathur
|
author: shivammathur
|
||||||
description: 'Setup a PHP environment with composer and add it to the PATH'
|
description: 'GitHub Action for PHP'
|
||||||
branding:
|
branding:
|
||||||
icon: 'activity'
|
|
||||||
color: 'purple'
|
color: 'purple'
|
||||||
|
icon: 'play-circle'
|
||||||
inputs:
|
inputs:
|
||||||
php-version:
|
php-version:
|
||||||
description: 'PHP version to install.'
|
description: 'Setup PHP version.'
|
||||||
|
required: false
|
||||||
|
php-version-file:
|
||||||
|
description: 'Setup PHP version from a file.'
|
||||||
|
required: false
|
||||||
|
extensions:
|
||||||
|
description: 'Setup PHP extensions.'
|
||||||
|
required: false
|
||||||
|
ini-file:
|
||||||
|
description: 'Set base ini file.'
|
||||||
|
required: false
|
||||||
|
default: 'production'
|
||||||
|
ini-values:
|
||||||
|
description: 'Add values to php.ini.'
|
||||||
|
required: false
|
||||||
|
coverage:
|
||||||
|
description: 'Setup code coverage driver.'
|
||||||
|
required: false
|
||||||
|
tools:
|
||||||
|
description: 'Setup popular tools globally.'
|
||||||
|
required: false
|
||||||
|
outputs:
|
||||||
|
php-version:
|
||||||
|
description: 'PHP version in semver format'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node20'
|
||||||
main: 'lib/install.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
Vendored
+5722
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
|||||||
# Contributors
|
|
||||||
|
|
||||||
Please submit a Pull Request to the develop branch
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# GitHub Action for roots/bedrock
|
||||||
|
name: Testing Bedrock
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
bedrock:
|
||||||
|
name: Bedrock (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: PHP test
|
||||||
|
run: composer test
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# GitHub Action for Blackfire Player
|
||||||
|
name: Play a Blackfire Scenario
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
blackfire-player:
|
||||||
|
name: Blackfire (PHP ${{ matrix.php-versions }})
|
||||||
|
# Add your Blackfire credentials securely using GitHub Secrets
|
||||||
|
env:
|
||||||
|
BLACKFIRE_SERVER_ID: ${{ secrets.BLACKFIRE_SERVER_ID }}
|
||||||
|
BLACKFIRE_SERVER_TOKEN: ${{ secrets.BLACKFIRE_SERVER_TOKEN }}
|
||||||
|
BLACKFIRE_CLIENT_ID: ${{ secrets.BLACKFIRE_CLIENT_ID }}
|
||||||
|
BLACKFIRE_CLIENT_TOKEN: ${{ secrets.BLACKFIRE_CLIENT_TOKEN }}
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
# blackfire-player supports PHP >= 5.5
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: blackfire
|
||||||
|
# Setup Blackfire CLI and player
|
||||||
|
tools: blackfire, blackfire-player
|
||||||
|
coverage: none
|
||||||
|
|
||||||
|
# Refer to https://blackfire.io/docs/player/index#usage
|
||||||
|
- name: Play the scenario
|
||||||
|
run: blackfire-player run scenario.bkf
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# GitHub Action for Blackfire
|
||||||
|
name: Profiling with blackfire
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
blackfire:
|
||||||
|
name: Blackfire (PHP ${{ matrix.php-versions }})
|
||||||
|
# Add your Blackfire credentials securely using GitHub Secrets
|
||||||
|
env:
|
||||||
|
BLACKFIRE_SERVER_ID: ${{ secrets.BLACKFIRE_SERVER_ID }}
|
||||||
|
BLACKFIRE_SERVER_TOKEN: ${{ secrets.BLACKFIRE_SERVER_TOKEN }}
|
||||||
|
BLACKFIRE_CLIENT_ID: ${{ secrets.BLACKFIRE_CLIENT_ID }}
|
||||||
|
BLACKFIRE_CLIENT_TOKEN: ${{ secrets.BLACKFIRE_CLIENT_TOKEN }}
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
# Blackfire supports PHP >= 5.3 on Ubuntu and macOS, and PHP >= 5.4 on Windows
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
# Setup Blackfire extension and CLI
|
||||||
|
extensions: blackfire
|
||||||
|
tools: blackfire
|
||||||
|
# Disable Xdebug and PCOV coverage drivers
|
||||||
|
coverage: none
|
||||||
|
|
||||||
|
# Refer to https://blackfire.io/docs/cookbooks/profiling-cli
|
||||||
|
- name: Profile
|
||||||
|
run: blackfire run php my-script.php
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
# GitHub Action for CakePHP with MySQL and Redis
|
||||||
|
# Tested with https://github.com/cakephp/app
|
||||||
|
name: Testing CakePHP with MySQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:latest
|
||||||
|
env:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
|
MYSQL_ROOT_PASSWORD: password
|
||||||
|
MYSQL_DATABASE: cakephp
|
||||||
|
ports:
|
||||||
|
- 3306/tcp
|
||||||
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- 6379/tcp
|
||||||
|
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
# You can also use ext-apcu or ext-memcached instead of ext-redis
|
||||||
|
# Install memcached if using ext-memcached
|
||||||
|
extensions: mbstring, intl, redis, pdo_mysql
|
||||||
|
coverage: pcov
|
||||||
|
|
||||||
|
# Local MySQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start mysql service
|
||||||
|
# run: sudo systemctl start mysql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
composer run-script post-install-cmd
|
||||||
|
|
||||||
|
# Add a step to run migrations if required
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
|
env:
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
DB_DSN: "mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/cakephp?init[]=SET sql_mode = \"STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\""
|
||||||
|
|
||||||
|
coding-standard:
|
||||||
|
name: Coding Standard
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.1'
|
||||||
|
extensions: mbstring, intl
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: PHP CodeSniffer
|
||||||
|
run: composer cs-check
|
||||||
|
|
||||||
|
static-analysis:
|
||||||
|
name: Static Analysis
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.1'
|
||||||
|
extensions: mbstring, intl
|
||||||
|
tools: phpstan
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Static Analysis using PHPStan
|
||||||
|
run: phpstan analyse --no-progress src/
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
# GitHub Action for CakePHP with PostgreSQL and Redis
|
||||||
|
# Tested with https://github.com/cakephp/app
|
||||||
|
name: Testing CakePHP with PostgreSQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
ports:
|
||||||
|
- 5432/tcp
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- 6379/tcp
|
||||||
|
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
# You can also use ext-apcu or ext-memcached instead of ext-redis
|
||||||
|
# Install memcached if using ext-memcached
|
||||||
|
extensions: mbstring, intl, redis, pdo_pgsql
|
||||||
|
coverage: pcov
|
||||||
|
|
||||||
|
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start postgresql service
|
||||||
|
# run: sudo systemctl start postgresql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
composer run-script post-install-cmd
|
||||||
|
|
||||||
|
# Add a step to run migrations if required
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
|
env:
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
DB_DSN: postgres://postgres@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/postgres
|
||||||
|
|
||||||
|
coding-standard:
|
||||||
|
name: Coding Standard
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.1'
|
||||||
|
extensions: mbstring, intl
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: PHP CodeSniffer
|
||||||
|
run: composer cs-check
|
||||||
|
|
||||||
|
static-analysis:
|
||||||
|
name: Static Analysis
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.1'
|
||||||
|
extensions: mbstring, intl
|
||||||
|
tools: phpstan
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Static Analysis using PHPStan
|
||||||
|
run: phpstan analyse --no-progress src/
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
# GitHub Action for CakePHP
|
||||||
|
# Tested with https://github.com/cakephp/app
|
||||||
|
name: Testing CakePHP
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, intl, pdo_sqlite, pdo_mysql
|
||||||
|
coverage: pcov
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
composer run-script post-install-cmd
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
|
|
||||||
|
coding-standard:
|
||||||
|
name: Coding Standard
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.1'
|
||||||
|
extensions: mbstring, intl
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: PHP CodeSniffer
|
||||||
|
run: composer cs-check
|
||||||
|
|
||||||
|
static-analysis:
|
||||||
|
name: Static Analysis
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.1'
|
||||||
|
extensions: mbstring, intl
|
||||||
|
tools: phpstan
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Static Analysis using PHPStan
|
||||||
|
run: phpstan analyse --no-progress src/
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# GitHub Action for CodeIgniter
|
||||||
|
name: Testing CodeIgniter
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, intl, curl, dom
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# GitHub Action for Laminas framework MVC projects
|
||||||
|
name: Testing Zend Framework
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
# GitHub Action for Laravel with MySQL and Redis
|
||||||
|
name: Testing Laravel with MySQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
laravel:
|
||||||
|
name: Laravel (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DB_DATABASE: laravel
|
||||||
|
DB_USERNAME: root
|
||||||
|
DB_PASSWORD: password
|
||||||
|
BROADCAST_DRIVER: log
|
||||||
|
CACHE_DRIVER: redis
|
||||||
|
QUEUE_CONNECTION: redis
|
||||||
|
SESSION_DRIVER: redis
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:latest
|
||||||
|
env:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
|
MYSQL_ROOT_PASSWORD: password
|
||||||
|
MYSQL_DATABASE: laravel
|
||||||
|
ports:
|
||||||
|
- 3306/tcp
|
||||||
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- 6379/tcp
|
||||||
|
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, dom, fileinfo, mysql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local MySQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start mysql service
|
||||||
|
# run: sudo systemctl start mysql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Prepare the application
|
||||||
|
run: |
|
||||||
|
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
php artisan key:generate
|
||||||
|
|
||||||
|
- name: Clear Config
|
||||||
|
run: php artisan config:clear
|
||||||
|
|
||||||
|
- name: Run Migration
|
||||||
|
run: php artisan migrate -v
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
# GitHub Action for Laravel with PostgreSQL and Redis
|
||||||
|
name: Testing Laravel with PostgreSQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
laravel:
|
||||||
|
name: Laravel (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
BROADCAST_DRIVER: log
|
||||||
|
CACHE_DRIVER: redis
|
||||||
|
QUEUE_CONNECTION: redis
|
||||||
|
SESSION_DRIVER: redis
|
||||||
|
DB_CONNECTION: pgsql
|
||||||
|
DB_HOST: localhost
|
||||||
|
DB_PASSWORD: postgres
|
||||||
|
DB_USERNAME: postgres
|
||||||
|
DB_DATABASE: postgres
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
ports:
|
||||||
|
- 5432/tcp
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- 6379/tcp
|
||||||
|
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, dom, fileinfo, pgsql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start postgresql service
|
||||||
|
# run: sudo systemctl start postgresql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Prepare the application
|
||||||
|
run: |
|
||||||
|
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
php artisan key:generate
|
||||||
|
|
||||||
|
- name: Clear Config
|
||||||
|
run: php artisan config:clear
|
||||||
|
|
||||||
|
- name: Run Migration
|
||||||
|
run: php artisan migrate -v
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
# GitHub Action for Laravel
|
||||||
|
name: Testing Laravel
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
laravel:
|
||||||
|
name: Laravel (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, dom, fileinfo
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Prepare the application
|
||||||
|
run: |
|
||||||
|
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
php artisan key:generate
|
||||||
|
|
||||||
|
- name: Clear Config
|
||||||
|
run: php artisan config:clear
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
# GitHub Action for Lumen with MySQL and Redis
|
||||||
|
name: Testing Lumen with MySQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
lumen:
|
||||||
|
name: Lumen (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DB_DATABASE: lumen
|
||||||
|
DB_USERNAME: root
|
||||||
|
DB_PASSWORD: password
|
||||||
|
BROADCAST_DRIVER: log
|
||||||
|
CACHE_DRIVER: redis
|
||||||
|
QUEUE_CONNECTION: redis
|
||||||
|
SESSION_DRIVER: redis
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:latest
|
||||||
|
env:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
|
MYSQL_ROOT_PASSWORD: password
|
||||||
|
MYSQL_DATABASE: lumen
|
||||||
|
ports:
|
||||||
|
- 3306/tcp
|
||||||
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- 6379/tcp
|
||||||
|
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, dom, fileinfo, mysql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local MySQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start mysql service
|
||||||
|
# run: sudo systemctl start mysql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: |
|
||||||
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
composer require predis/predis illuminate/redis
|
||||||
|
|
||||||
|
- name: Prepare the application
|
||||||
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
|
||||||
|
- name: Register Redis as service provider
|
||||||
|
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
|
||||||
|
|
||||||
|
- name: Run Migration
|
||||||
|
run: php artisan migrate -v
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
# GitHub Action for Lumen with PostgreSQL and Redis
|
||||||
|
name: Testing Lumen with PostgreSQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
laravel:
|
||||||
|
name: Lumen (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
BROADCAST_DRIVER: log
|
||||||
|
CACHE_DRIVER: redis
|
||||||
|
QUEUE_CONNECTION: redis
|
||||||
|
SESSION_DRIVER: redis
|
||||||
|
DB_CONNECTION: pgsql
|
||||||
|
DB_HOST: localhost
|
||||||
|
DB_PASSWORD: postgres
|
||||||
|
DB_USERNAME: postgres
|
||||||
|
DB_DATABASE: postgres
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
ports:
|
||||||
|
- 5432/tcp
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- 6379/tcp
|
||||||
|
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, dom, fileinfo, pgsql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start postgresql service
|
||||||
|
# run: sudo systemctl start postgresql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: |
|
||||||
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
composer require predis/predis illuminate/redis
|
||||||
|
|
||||||
|
- name: Prepare the application
|
||||||
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
|
||||||
|
- name: Register Redis as service provider
|
||||||
|
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
|
||||||
|
|
||||||
|
- name: Run Migration
|
||||||
|
run: php artisan migrate -v
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||||
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# GitHub Action for Lumen
|
||||||
|
name: Unit Testing Lumen
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
lumen:
|
||||||
|
name: Lumen (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, dom, fileinfo, mysql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Prepare the application
|
||||||
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
# GitHub Action for Phalcon with MySQL
|
||||||
|
## Notes
|
||||||
|
## Make sure you have .env.example or .env file in your project
|
||||||
|
## and you have loaded Dotenv (https://github.com/vlucas/phpdotenv)
|
||||||
|
name: Testing Phalcon with MySQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
phalcon:
|
||||||
|
name: Phalcon (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DB_ADAPTER: mysql
|
||||||
|
DB_HOST: 127.0.0.1
|
||||||
|
DB_NAME: phalcon
|
||||||
|
DB_USERNAME: root
|
||||||
|
DB_PASSWORD: password
|
||||||
|
CODECEPTION_URL: 127.0.0.1
|
||||||
|
CODECEPTION_PORT: 8888
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:latest
|
||||||
|
env:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
|
MYSQL_ROOT_PASSWORD: password
|
||||||
|
MYSQL_DATABASE: phalcon
|
||||||
|
ports:
|
||||||
|
- 3306/tcp
|
||||||
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.2', '7.3', '7.4']
|
||||||
|
# For phalcon 3.x, use
|
||||||
|
# php-versions: ['7.0', '7.1', '7.2', '7.3']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
# Use phalcon3 for the phalcon 3.x.
|
||||||
|
extensions: mbstring, dom, zip, phalcon4, mysql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local MySQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start mysql service
|
||||||
|
# run: sudo systemctl start mysql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Prepare the application
|
||||||
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
|
||||||
|
- name: Run Migration
|
||||||
|
run: |
|
||||||
|
if [ ! -e phinx.yml ]; then vendor/bin/phinx init; fi
|
||||||
|
vendor/bin/phinx migrate
|
||||||
|
vendor/bin/phinx seed:run
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
(cd public && nohup php -S $CODECEPTION_URL:$CODECEPTION_PORT > phalcon.log 2>&1 &)
|
||||||
|
vendor/bin/codecept build
|
||||||
|
vendor/bin/codecept run
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
# GitHub Action for Phalcon with PostgreSQL
|
||||||
|
## Notes
|
||||||
|
## Make sure you have .env.example or .env file in your project
|
||||||
|
## and you have loaded Dotenv (https://github.com/vlucas/phpdotenv)
|
||||||
|
name: Testing Phalcon with PostgreSQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
phalcon:
|
||||||
|
name: Phalcon (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DB_ADAPTER: pgsql
|
||||||
|
DB_HOST: 127.0.0.1
|
||||||
|
DB_NAME: postgres
|
||||||
|
DB_USERNAME: postgres
|
||||||
|
DB_PASSWORD: postgres
|
||||||
|
CODECEPTION_URL: 127.0.0.1
|
||||||
|
CODECEPTION_PORT: 8888
|
||||||
|
DB_CONNECTION: pgsql
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
ports:
|
||||||
|
- 5432/tcp
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.2', '7.3', '7.4']
|
||||||
|
# For phalcon 3.x, use
|
||||||
|
# php-versions: ['7.0', '7.1', '7.2', '7.3']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
# Use phalcon3 for the phalcon 3.x
|
||||||
|
extensions: mbstring, dom, zip, phalcon4, pgsql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start postgresql service
|
||||||
|
# run: sudo systemctl start postgresql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
- name: Prepare the application
|
||||||
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
- name: Run Migration
|
||||||
|
run: |
|
||||||
|
if [ ! -e phinx.yml ]; then vendor/bin/phinx init; fi
|
||||||
|
vendor/bin/phinx migrate
|
||||||
|
vendor/bin/phinx seed:run
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.postgres.ports['5432'] }}
|
||||||
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
(cd public && nohup php -S $CODECEPTION_URL:$CODECEPTION_PORT > phalcon.log 2>&1 &)
|
||||||
|
vendor/bin/codecept build
|
||||||
|
vendor/bin/codecept run
|
||||||
|
env:
|
||||||
|
DB_PORT: ${{ job.services.postgres.ports['5432'] }}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
# GitHub Action for roots/sage
|
||||||
|
name: Testing Sage
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
sage:
|
||||||
|
name: Sage (PHP ${{ matrix.php-versions }} & Node ${{ matrix.node-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
node-versions: ['16']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-versions }}
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring
|
||||||
|
|
||||||
|
- name: Check node versions
|
||||||
|
run: node -v
|
||||||
|
|
||||||
|
- name: Get yarn cache
|
||||||
|
id: yarn-cache
|
||||||
|
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install yarn dependencies
|
||||||
|
run: yarn -V
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Yarn test and build
|
||||||
|
run: |
|
||||||
|
yarn run test
|
||||||
|
yarn run build
|
||||||
|
yarn run rmdist
|
||||||
|
yarn run "build:production"
|
||||||
|
|
||||||
|
- name: PHP test
|
||||||
|
run: composer test
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# GitHub Action for Slim Framework
|
||||||
|
name: Testing Slim Framework
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, simplexml, dom
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Test with phpunit
|
||||||
|
run: vendor/bin/phpunit --coverage-text
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
# GitHub Action for Symfony with MySQL
|
||||||
|
name: Testing Symfony with MySQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
symfony:
|
||||||
|
name: Symfony (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:latest
|
||||||
|
env:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
|
MYSQL_ROOT_PASSWORD: symfony
|
||||||
|
MYSQL_DATABASE: symfony
|
||||||
|
ports:
|
||||||
|
- 3306/tcp
|
||||||
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
tools: phpunit-bridge
|
||||||
|
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local MySQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start mysql service
|
||||||
|
# run: sudo systemctl start mysql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Run Migration
|
||||||
|
run: |
|
||||||
|
composer require --dev symfony/orm-pack
|
||||||
|
php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
|
||||||
|
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
|
||||||
|
env:
|
||||||
|
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
|
||||||
|
|
||||||
|
- name: Install PHPUnit
|
||||||
|
run: simple-phpunit install
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: simple-phpunit --coverage-text
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
# GitHub Action for Symfony with PostgreSQL
|
||||||
|
name: Testing Symfony with PostgreSQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
symfony:
|
||||||
|
name: Symfony (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
ports:
|
||||||
|
- 5432/tcp
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
tools: phpunit-bridge
|
||||||
|
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start postgresql service
|
||||||
|
# run: sudo systemctl start postgresql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Run Migration
|
||||||
|
run: |
|
||||||
|
composer require --dev symfony/orm-pack
|
||||||
|
php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
|
||||||
|
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
|
||||||
|
env:
|
||||||
|
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
|
||||||
|
|
||||||
|
- name: Install PHPUnit
|
||||||
|
run: simple-phpunit install
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: simple-phpunit --coverage-text
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# GitHub Action for Symfony
|
||||||
|
name: Testing Symfony
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
symfony:
|
||||||
|
name: Symfony (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
|
||||||
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
tools: phpunit-bridge
|
||||||
|
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Install PHPUnit
|
||||||
|
run: simple-phpunit install
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: simple-phpunit --coverage-text
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
# GitHub Action for Yii Framework with MySQL
|
||||||
|
name: Testing Yii2 with MySQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
yii:
|
||||||
|
name: Yii2 (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DB_USERNAME: root
|
||||||
|
DB_PASSWORD: yii
|
||||||
|
TEST_DB_USERNAME: root
|
||||||
|
TEST_DB_PASSWORD: yii
|
||||||
|
DB_CHARSET: utf8
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:latest
|
||||||
|
env:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
|
MYSQL_ROOT_PASSWORD: yii
|
||||||
|
MYSQL_DATABASE: yii
|
||||||
|
ports:
|
||||||
|
- 3306/tcp
|
||||||
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set Node.js 10.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10.x
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, intl, gd, imagick, zip, dom, mysql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local MySQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start mysql service
|
||||||
|
# run: sudo systemctl start mysql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Prepare the application
|
||||||
|
run: |
|
||||||
|
php -r "file_exists('.env') || copy('.env.dist', '.env');"
|
||||||
|
php console/yii app/setup
|
||||||
|
npm install --development
|
||||||
|
npm run build
|
||||||
|
env:
|
||||||
|
DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
||||||
|
TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
vendor/bin/codecept build
|
||||||
|
php tests/bin/yii app/setup --interactive=0
|
||||||
|
nohup php -S localhost:8080 > yii.log 2>&1 &
|
||||||
|
vendor/bin/codecept run
|
||||||
|
env:
|
||||||
|
DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
||||||
|
TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
# GitHub Action for Yii Framework with PostgreSQL
|
||||||
|
name: Testing Yii2 with PostgreSQL
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
yii:
|
||||||
|
name: Yii2 (PHP ${{ matrix.php-versions }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DB_USERNAME: postgres
|
||||||
|
DB_PASSWORD: postgres
|
||||||
|
TEST_DB_USERNAME: postgres
|
||||||
|
TEST_DB_PASSWORD: postgres
|
||||||
|
DB_CHARSET: utf8
|
||||||
|
|
||||||
|
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
ports:
|
||||||
|
- 5432/tcp
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.4', '8.0']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set Node.js 10.x
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 10.x
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, intl, gd, imagick, zip, dom, pgsql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
|
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
|
||||||
|
# If you are using it instead of service containers, make sure you start it.
|
||||||
|
# - name: Start postgresql service
|
||||||
|
# run: sudo systemctl start postgresql.service
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composer-cache
|
||||||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Cache composer dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
|
# Use composer.json for key, if composer.lock is not committed.
|
||||||
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
|
- name: Prepare the application
|
||||||
|
run: |
|
||||||
|
php -r "file_exists('.env') || copy('.env.dist', '.env');"
|
||||||
|
php console/yii app/setup
|
||||||
|
npm install --development
|
||||||
|
npm run build
|
||||||
|
env:
|
||||||
|
DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
|
||||||
|
TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: |
|
||||||
|
vendor/bin/codecept build
|
||||||
|
php tests/bin/yii app/setup --interactive=0
|
||||||
|
nohup php -S localhost:8080 > yii.log 2>&1 &
|
||||||
|
vendor/bin/codecept run
|
||||||
|
env:
|
||||||
|
DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
|
||||||
|
TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
|
||||||
+3
-2
@@ -7,5 +7,6 @@ module.exports = {
|
|||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': 'ts-jest'
|
'^.+\\.ts$': 'ts-jest'
|
||||||
},
|
},
|
||||||
verbose: true
|
verbose: true,
|
||||||
}
|
collectCoverage: true
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
||||||
result["default"] = mod;
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const core = __importStar(require("@actions/core"));
|
|
||||||
const exec_1 = require("@actions/exec/lib/exec");
|
|
||||||
var https = require('https');
|
|
||||||
const fs = require('fs');
|
|
||||||
function get_file(filename) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
let github_path = 'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/';
|
|
||||||
const file = fs.createWriteStream(filename);
|
|
||||||
const request = https.get(github_path + filename, function (response) {
|
|
||||||
response.pipe(file);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function run() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
try {
|
|
||||||
let version = process.env['php-version'];
|
|
||||||
if (!version) {
|
|
||||||
version = core.getInput('php-version', { required: true });
|
|
||||||
}
|
|
||||||
console.log('Input: ' + version);
|
|
||||||
let os_version = process.platform;
|
|
||||||
if (os_version == 'darwin') {
|
|
||||||
yield get_file('darwin.sh');
|
|
||||||
yield exec_1.exec('sudo chmod a+x darwin.sh');
|
|
||||||
yield exec_1.exec('./darwin.sh ' + version);
|
|
||||||
}
|
|
||||||
else if (os_version == 'win32') {
|
|
||||||
yield get_file('windows.ps1');
|
|
||||||
yield exec_1.exec('DIR');
|
|
||||||
yield exec_1.exec('powershell .\\windows.ps1 -version ' + version);
|
|
||||||
}
|
|
||||||
else if (os_version == 'linux') {
|
|
||||||
yield get_file('linux.sh');
|
|
||||||
yield exec_1.exec('sudo chmod a+x linux.sh');
|
|
||||||
yield exec_1.exec('./linux.sh ' + version);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
core.setFailed(err.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
run().then(() => {
|
|
||||||
console.log('done');
|
|
||||||
});
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
||||||
result["default"] = mod;
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const core = __importStar(require("@actions/core"));
|
|
||||||
const exec_1 = require("@actions/exec/lib/exec");
|
|
||||||
var https = require('https');
|
|
||||||
const fs = require('fs');
|
|
||||||
function get_file(filename) {
|
|
||||||
let github_path = 'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/';
|
|
||||||
const file = fs.createWriteStream(filename);
|
|
||||||
const request = https.get(github_path + filename, function (response) {
|
|
||||||
response.pipe(file);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function run() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
try {
|
|
||||||
const version = core.getInput('php-version', { required: true });
|
|
||||||
console.log('Input: ' + version);
|
|
||||||
let os_version = process.platform;
|
|
||||||
if (os_version == 'darwin') {
|
|
||||||
get_file('darwin.sh');
|
|
||||||
yield exec_1.exec('sudo chmod a+x darwin.sh');
|
|
||||||
yield exec_1.exec('./darwin.sh ' + version);
|
|
||||||
}
|
|
||||||
else if (os_version == 'win32') {
|
|
||||||
get_file('windows.ps1');
|
|
||||||
yield exec_1.exec('powershell windows.ps1 -version ' + version);
|
|
||||||
}
|
|
||||||
else if (os_version == 'linux') {
|
|
||||||
get_file('linux.sh');
|
|
||||||
yield exec_1.exec('sudo chmod a+x linux.sh');
|
|
||||||
yield exec_1.exec('./linux.sh ' + version);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
core.setFailed(err.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
run().then(() => {
|
|
||||||
console.log('done');
|
|
||||||
});
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
let v = process.env['php-version'];
|
|
||||||
console.log(v);
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../acorn/bin/acorn" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\acorn\bin\acorn" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\acorn\bin\acorn" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../atob/bin/atob.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../atob/bin/atob.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\atob\bin\atob.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\atob\bin\atob.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../escodegen/bin/escodegen.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\escodegen\bin\escodegen.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\escodegen\bin\escodegen.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../escodegen/bin/esgenerate.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\escodegen\bin\esgenerate.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\escodegen\bin\esgenerate.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../esprima/bin/esparse.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\esprima\bin\esparse.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\esprima\bin\esparse.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../esprima/bin/esvalidate.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\esprima\bin\esvalidate.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\esprima\bin\esvalidate.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../handlebars/bin/handlebars" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../handlebars/bin/handlebars" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\handlebars\bin\handlebars" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\handlebars\bin\handlebars" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../husky/lib/upgrader/bin.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../husky/lib/upgrader/bin.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\husky\lib\upgrader\bin.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\husky\lib\upgrader\bin.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../import-local/fixtures/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../import-local/fixtures/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\import-local\fixtures\cli.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\import-local\fixtures\cli.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../is-ci/bin.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../is-ci/bin.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\is-ci\bin.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\is-ci\bin.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../jest/bin/jest.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../jest/bin/jest.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../jest-runtime/bin/jest-runtime.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../jest-runtime/bin/jest-runtime.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\jest-runtime\bin\jest-runtime.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\jest-runtime\bin\jest-runtime.js" %*
|
|
||||||
)
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\jest\bin\jest.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\jest\bin\jest.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\js-yaml\bin\js-yaml.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\js-yaml\bin\js-yaml.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../jsesc/bin/jsesc" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\jsesc\bin\jsesc" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\jsesc\bin\jsesc" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../json5/lib/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\json5\lib\cli.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\json5\lib\cli.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../loose-envify/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../loose-envify/cli.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\loose-envify\cli.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\loose-envify\cli.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../mkdirp/bin/cmd.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\mkdirp\bin\cmd.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\@babel\parser\bin\babel-parser.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\@babel\parser\bin\babel-parser.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../prettier/bin-prettier.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../prettier/bin-prettier.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\prettier\bin-prettier.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\prettier\bin-prettier.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
"$basedir/node" "$basedir/../rimraf/bin.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
node "$basedir/../rimraf/bin.js" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\rimraf\bin.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\rimraf\bin.js" %*
|
|
||||||
)
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -x "$basedir/bash" ]; then
|
|
||||||
"$basedir/bash" "$basedir/../run-node/run-node" "$@"
|
|
||||||
ret=$?
|
|
||||||
else
|
|
||||||
bash "$basedir/../run-node/run-node" "$@"
|
|
||||||
ret=$?
|
|
||||||
fi
|
|
||||||
exit $ret
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
@IF EXIST "%~dp0\bash.exe" (
|
|
||||||
"%~dp0\bash.exe" "%~dp0\..\run-node\run-node" %*
|
|
||||||
) ELSE (
|
|
||||||
@SETLOCAL
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
bash "%~dp0\..\run-node\run-node" %*
|
|
||||||
)
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user