Skip to content

Commit 0d20ea0

Browse files
committed
improved the continuous-integration workflow
1 parent 59de914 commit 0d20ea0

File tree

6 files changed

+98
-9
lines changed

6 files changed

+98
-9
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/.gitattributes export-ignore
22
/.gitignore export-ignore
3-
/.travis.yml export-ignore
3+
/.travis.yml.old export-ignore
44
/CONTRIBUTING.md export-ignore
55
/phpcs.xml.dist export-ignore
66
/phpstan.neon export-ignore
77
/performance export-ignore
88
/generator export-ignore
9+
/.github export-ignore

.github/workflows/continuous-integration.yml

Lines changed: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,30 @@ on:
77
- "push"
88

99
jobs:
10-
continuous-integratio:
10+
11+
init-php-doc:
12+
name: "Init the php documentation cache"
13+
runs-on: "ubuntu-latest"
14+
steps:
15+
- name: "Checkout"
16+
uses: "actions/[email protected]"
17+
18+
- name: "Cache PHP documentation checked out with svn"
19+
id: cache-svn
20+
uses: "actions/[email protected]"
21+
with:
22+
path: "generator/doc/doc-en"
23+
key: "php-documentation"
24+
25+
- name: "Check out PHP documentation with svn"
26+
if: steps.cache-svn.outputs.cache-hit != 'true'
27+
run: svn co https://svn.php.net/repository/phpdoc/modules/doc-en doc-en
28+
working-directory: "generator/doc"
29+
30+
continuous-integration:
1131
name: "Continuous Integration"
1232

33+
needs: init-php-doc
1334
runs-on: "ubuntu-latest"
1435

1536
strategy:
@@ -31,12 +52,80 @@ jobs:
3152
coverage: "none"
3253
php-version: "${{ matrix.php-version }}"
3354

55+
- name: "Cache PHP documentation checked out with svn"
56+
id: cache-svn
57+
uses: "actions/[email protected]"
58+
with:
59+
path: "generator/doc/doc-en"
60+
key: "php-documentation"
61+
3462
- name: "Cache dependencies installed with composer"
3563
uses: "actions/[email protected]"
3664
with:
3765
path: "~/.composer/cache"
3866
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}"
3967
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
4068

69+
- name: "Install dependencies with composer in generator/ directory"
70+
run: "composer install --no-interaction"
71+
working-directory: "generator"
72+
4173
- name: "Install dependencies with composer in root directory"
42-
run: "composer install --no-interaction --no-progress --no-suggest"
74+
run: "composer install --no-interaction"
75+
76+
- name: "Run tests with phpunit/phpunit in generator/ directory"
77+
run: "vendor/bin/phpunit"
78+
working-directory: "generator"
79+
80+
- name: "Run coding standard checks with squizlabs/php_codesniffer in generator/ directory"
81+
run: "composer cs-check"
82+
working-directory: "generator"
83+
84+
- name: "Run static code analysis with phpstan/phpstan in generator/ directory"
85+
run: "composer phpstan"
86+
working-directory: "generator"
87+
88+
- name: "Dump autoloader with composer in root directory"
89+
run: "composer dump-autoload"
90+
91+
- name: "Run coding standard checks with squizlabs/php_codesniffer in root directory"
92+
run: "composer cs-check"
93+
94+
- name: "Run static code analysis with phpstan/phpstan in root directory"
95+
run: "composer phpstan"
96+
97+
- name: "Regenerate files"
98+
run: "./safe.php generate"
99+
working-directory: "generator"
100+
101+
- name: "Check if regenerated files are different"
102+
run: |
103+
if output=$(git status --porcelain) && [ -z "$output" ]; then
104+
# all is good
105+
echo "Generated files are the same as committed file: OK"
106+
else
107+
# Uncommitted changes
108+
echo "Generated files are different from commited files. Please run './safe.php generate' command and commit the results."
109+
echo "Detected changes:"
110+
git status
111+
git diff
112+
echo "Generated files are different from commited files. Please run './safe.php generate' command and commit the results."
113+
exit 1;
114+
fi
115+
- name: "Check if refactoring can be done with rector/rector:~0.5.0"
116+
run: "composer install && composer rector && composer test"
117+
working-directory: "generator/tests/rector/0.5"
118+
119+
- name: "Check if refactoring can be done with rector/rector:~0.6.0"
120+
run: "composer install && composer rector && composer test"
121+
working-directory: "generator/tests/rector/0.6"
122+
123+
#- name: "Archive code coverage results"
124+
# uses: "actions/upload-artifact@v1"
125+
# with:
126+
# name: "build"
127+
# path: "generator/build"
128+
#
129+
#- name: "Upload test coverage to coveralls"
130+
# run: "php vendor/bin/php-coveralls -v"
131+
# working-directory: "generator"
File renamed without changes.

generated/curl.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1607,11 +1607,11 @@ function curl_multi_init()
16071607
* CURLAUTH_NONE allows no authentication.
16081608
*
16091609
*
1610-
*
16111610
* Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI.
16121611
* Set the actual username and password with the CURLOPT_PROXYUSERPWD option.
16131612
*
16141613
*
1614+
*
16151615
* Available as of 7.3.0 and curl >= 7.55.0.
16161616
*
16171617
*
@@ -1927,6 +1927,9 @@ function curl_multi_init()
19271927
*
19281928
* CURLAUTH_NONE allows no authentication.
19291929
*
1930+
* Defaults to CURLAUTH_BASIC|CURLAUTH_GSSAPI.
1931+
* Set the actual username and password with the CURLOPT_PROXYUSERPWD option.
1932+
*
19301933
* Your best bet is to not set this and let it use the default.
19311934
* Setting it to 2 or 3 is very dangerous given the known
19321935
* vulnerabilities in SSLv2 and SSLv3.

generated/filesystem.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -970,11 +970,6 @@ function fwrite($handle, string $string, int $length = null): int
970970
*
971971
*
972972
*
973-
* ... - Matches all the subdirectories, recursively.
974-
*
975-
*
976-
*
977-
*
978973
* \ - Escapes the following character,
979974
* except when the GLOB_NOESCAPE flag is used.
980975
*

generator/config/ignoredModules.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@
4949
'win32ps',
5050
'wincache',
5151
'xattr',
52+
'runkit7',
5253
];

0 commit comments

Comments
 (0)