-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shikha Mishra
authored and
Shikha Mishra
committed
Jul 3, 2021
0 parents
commit 11d8aad
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Container image that runs your code | ||
FROM php:7.3-cli-alpine3.9 | ||
|
||
COPY --from=composer:1 /usr/bin/composer /usr/local/bin/composer | ||
|
||
RUN /usr/local/bin/composer global require magento/magento-coding-standard:* | ||
RUN ~/.composer/vendor/bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard/ | ||
RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini | ||
# Copies your code file from your action repository to the filesystem path `/` of the container | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
# Code file to execute when the docker container starts up (`entrypoint.sh`) | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Coding Standard for Magento 2 docker action | ||
|
||
This action checks coding standard of magento 2 extensions. | ||
|
||
## Inputs | ||
|
||
## `error-severity` | ||
|
||
The severity of error to check. Default `"10"`. | ||
|
||
## Outputs | ||
|
||
## `errors` | ||
|
||
The test result | ||
|
||
## Example usage | ||
|
||
uses: actions/magento2-docker-action@v1 | ||
with: | ||
error-severity: '10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# action.yml | ||
name: 'Coding Standard for Magento 2' | ||
description: 'Github Action for magento 2' | ||
inputs: | ||
error-severity: # id of input | ||
description: 'Error severity' | ||
required: false | ||
default: '10' | ||
outputs: | ||
time: # id of output | ||
description: 'The test result' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.error-severity }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh -l | ||
|
||
cd $GITHUB_WORKSPACE | ||
sh -c "/root/.composer/vendor/bin/phpcs --standard=Magento2 --error-severity=10 --warning-severity=8 $GITHUB_WORKSPACE -s $*" |