File tree Expand file tree Collapse file tree 4 files changed +54
-0
lines changed Expand file tree Collapse file tree 4 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ # Container image that runs your code
2+ FROM php:7.3-cli-alpine3.9
3+
4+ COPY --from=composer:1 /usr/bin/composer /usr/local/bin/composer
5+
6+ RUN /usr/local/bin/composer global require magento/magento-coding-standard:*
7+ RUN ~/.composer/vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/
8+ RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini
9+ # Copies your code file from your action repository to the filesystem path `/` of the container
10+ COPY entrypoint.sh /entrypoint.sh
11+
12+ # Code file to execute when the docker container starts up (`entrypoint.sh`)
13+ ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ # Coding Standard for Magento 2 docker action
2+
3+ This action checks coding standard of magento 2 extensions.
4+
5+ ## Inputs
6+
7+ ## ` error-severity `
8+
9+ The severity of error to check. Default ` "10" ` .
10+
11+ ## Outputs
12+
13+ ## ` errors `
14+
15+ The test result
16+
17+ ## Example usage
18+
19+ uses: actions/magento2-docker-action@v1
20+ with:
21+ error-severity: '10'
Original file line number Diff line number Diff line change 1+ # action.yml
2+ name : ' Coding Standard for Magento 2'
3+ description : ' Github Action for magento 2'
4+ inputs :
5+ error-severity : # id of input
6+ description : ' Error severity'
7+ required : false
8+ default : ' 10'
9+ outputs :
10+ time : # id of output
11+ description : ' The test result'
12+ runs :
13+ using : ' docker'
14+ image : ' Dockerfile'
15+ args :
16+ - ${{ inputs.error-severity }}
Original file line number Diff line number Diff line change 1+ #! /bin/sh -l
2+
3+ cd $GITHUB_WORKSPACE
4+ sh -c " /root/.composer/vendor/bin/phpcs --standard=Magento2 --error-severity=10 --warning-severity=8 $GITHUB_WORKSPACE -s $* "
You can’t perform that action at this time.
0 commit comments