File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : ' PHPCompatibility'
2+ author : ' ExtDN'
3+ description : ' performs php static code analysis with the PHPCompatibility Coding Standard'
4+ inputs :
5+ phpcs_standard :
6+ description : ' PHPCompatibility standard.'
7+ required : false
8+ runs :
9+ using : ' docker'
10+ image : ' docker://extdn/php-compatibility-action:7.3-latest'
11+ branding :
12+ icon : ' code'
13+ color : ' green'
Original file line number Diff line number Diff line change 1+ name : ' PHPCompatibility'
2+ author : ' ExtDN'
3+ description : ' performs php static code analysis with the PHPCompatibility Coding Standard'
4+ inputs :
5+ phpcs_standard :
6+ description : ' PHPCompatibility standard.'
7+ required : false
8+ runs :
9+ using : ' docker'
10+ image : ' docker://extdn/php-compatibility-action:7.4-latest'
11+ branding :
12+ icon : ' code'
13+ color : ' green'
Original file line number Diff line number Diff line change 1+ FROM php:7.3-cli-alpine3.9
2+
3+ COPY --from=composer:1 /usr/bin/composer /usr/local/bin/composer
4+
5+ RUN /usr/local/bin/composer global require phpcompatibility/php-compatibility:*
6+ RUN ~/.composer/vendor/bin/phpcs --config-set installed_paths ../../phpcompatibility/php-compatibility
7+ RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini
8+
9+ ADD problem-matcher.json /problem-matcher.json
10+ ADD entrypoint.sh /entrypoint.sh
11+ ENTRYPOINT ["/entrypoint.sh"]
Original file line number Diff line number Diff line change 1+ FROM php:7.4-cli-alpine
2+
3+ COPY --from=composer:1 /usr/bin/composer /usr/local/bin/composer
4+
5+ RUN /usr/local/bin/composer global require phpcompatibility/php-compatibility:*
6+ RUN ~/.composer/vendor/bin/phpcs --config-set installed_paths ../../phpcompatibility/php-compatibility
7+ RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini
8+
9+ ADD problem-matcher.json /problem-matcher.json
10+ ADD entrypoint.sh /entrypoint.sh
11+ ENTRYPOINT ["/entrypoint.sh"]
Original file line number Diff line number Diff line change 1+ name : ' PHPCompatibility'
2+ author : ' ExtDN'
3+ description : ' performs php static code analysis with the PHPCompatibility Standard'
4+ inputs :
5+ phpcs_standard :
6+ description : ' PHPCompatibility standard'
7+ required : false
8+ runs :
9+ using : ' docker'
10+ image : ' docker://extdn/php-compatibility-action:latest'
11+ branding :
12+ icon : ' code'
13+ color : ' green'
Original file line number Diff line number Diff line change 1+ #! /bin/sh -l
2+
3+ # Copy the matcher to a shared volume with the host; otherwise "add-matcher"
4+ # can't find it.
5+ cp /problem-matcher.json ${HOME} /
6+ echo " ::add-matcher::${HOME} /problem-matcher.json"
7+
8+ cd $GITHUB_WORKSPACE
9+ test -z " ${INPUT_RUNTIME} " && INPUT_RUNTIME=7.3-7.4
10+ sh -c " /root/.composer/vendor/bin/phpcs --report=checkstyle --standard=PHPCompatibility --runtime-set testVersion $INPUT_RUNTIME $GITHUB_WORKSPACE -s $* "
Original file line number Diff line number Diff line change 1+ {
2+ "problemMatcher" : [
3+ {
4+ "owner" : " phpcs" ,
5+ "severity" : " error" ,
6+ "pattern" : [
7+ {
8+ "regexp" : " ^<file name=\" (?:\\ /github\\ /workspace\\ /)?(.*)\" >$" ,
9+ "file" : 1
10+ },
11+ {
12+ "regexp" : " <error line=\" (\\ d*)\" column=\" (\\ d*)\" severity=\" (error|warning)\" message=\" (.*)\" source=\" (.*)(\"\\ />+)$" ,
13+ "line" : 1 ,
14+ "column" : 2 ,
15+ "severity" : 3 ,
16+ "message" : 4 ,
17+ "code" : 5 ,
18+ "loop" : true
19+ }
20+ ]
21+ }
22+ ]
23+ }
You can’t perform that action at this time.
0 commit comments