Skip to content

Commit

Permalink
Fixes #23
Browse files Browse the repository at this point in the history
  • Loading branch information
seyuf authored Apr 30, 2022
1 parent 007d9b6 commit 55aba29
Showing 1 changed file with 32 additions and 18 deletions.
50 changes: 32 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,23 @@ Config Example when magento v2.4
- uses: actions/checkout@v1 # pulls your repository, M2 src must be in a magento directory
- name: 'this step will execute all the unit tests available'
if: always()
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'unit-test'
elasticsearch: 1
- name: 'this step starts static testing the code'
if: always()
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'static-test'
elasticsearch: 1
- name: 'this step will build an magento artifact'
if: always()
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand Down Expand Up @@ -100,29 +100,29 @@ jobs:
- uses: actions/checkout@v1 # pulls your repository, M2 src must be in a magento directory
- name: 'this step will execute all the unit tests available'
if: always()
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'unit-test'
- name: 'this step starts static testing the code'
if: always()
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'static-test'
- name: 'this step will build an magento artifact'
if: always()
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'build'
```
To use the latest experimental version of the module set the following : (`uses: MAD-I-T/magento-actions@master`)

If some issues are encountered on 2.3.X version, please use the **v2.0** of the action in place of **v3.10**
If some issues are encountered on 2.3.X version, please use the **v2.0** of the action in place of **v3.11**

Also, in some custom cases it may be needed to force/specify the php version to use in the step.
This can be done by adding php input (after **with:** option).
Expand All @@ -146,7 +146,7 @@ For magento 2.4 & 2.3

```
- name: 'this step will deploy your build to deployment server - zero downtime'
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
BUCKET_COMMIT: bucket-commit-${{github.sha}}.tar.gz
Expand All @@ -163,7 +163,7 @@ For magento 2.4 & 2.3
- name: 'unlock php deployer if the deployment fails'
if: failure() || cancelled()
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
BUCKET_COMMIT: bucket-commit-${{github.sha}}.tar.gz
Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: 'install fresh magento and copy to repo'
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand Down Expand Up @@ -302,7 +302,7 @@ For magento 2.4 and 2.3
```
- name: 'test some specific module code quality'
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand All @@ -321,7 +321,7 @@ For magento 2.4.x (**remove elasticsearch 1 when building with 2.3.X**)
```
- name: 'This step will build an magento artifact'
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand Down Expand Up @@ -356,7 +356,7 @@ For magento 2.4.x
```
- name: 'This step will scan the files for security breach'
if: always()
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand Down Expand Up @@ -386,7 +386,7 @@ For magento 2.4.x
```
- name: 'This step will check all modules for security vulnerabilities'
if: always()
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand Down Expand Up @@ -420,7 +420,7 @@ See code sample [here](https://github.com/seyuf/m2-dev-github-actions/blob/49c3d
For magento 2.4.x (**remove elasticsearch 1 when building with 2.3.X**)
```
- name: 'This step will execute all the unit tests available'
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand All @@ -431,7 +431,7 @@ For magento 2.4.x (**remove elasticsearch 1 when building with 2.3.X**)
Run all unit test of the magento email module
```
- name: 'This step will execute specific unit tests in the path dir'
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand Down Expand Up @@ -489,7 +489,7 @@ steps:
submodules: recursive
- name: 'launch magento2 integration test'
if: ${{false}}
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand All @@ -503,7 +503,7 @@ steps:
For magento 2.3 & 2.4
```
- name: 'This step starts static testing the code'
uses: MAD-I-T/magento-actions@v3.10
uses: MAD-I-T/magento-actions@v3.11
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
Expand Down Expand Up @@ -536,6 +536,15 @@ For magento 2.3 & 2.4
└── config # the filenames must be similar to thoses of the action ex: config/integration-test-config.php
└── scripts # ex: scripts/build.sh to override the build behaviour
```


<div align="center">
<a href="https://youtu.be/kRIzj2Vv5zE"><img src="https://user-images.githubusercontent.com/3765910/166113686-4dfd2482-ff96-48d3-8dda-fb769e891458.png" alt="check code against magento coding standard using github actions"></a> <h6>Video tutorial about overriding</h4>
</div>


[See more](https://forum.madit.fr/t/magento-actions-override-default-scripts/19) about overriding


## tipycal issues
- If you're using a self-hosted runner please run it as root user using `sudo ./svc.sh install`
Expand All @@ -547,6 +556,11 @@ For magento 2.3 & 2.4
`
- [see example here](https://github.com/seyuf/m2-dev-github-actions/blob/master/.github/workflows/main.yml#L104)


## Force composer version
Although the action automatically detects and set the appropriate composer version according to the user's codebase (magento version).
One can still force the composer version to be used through the *composer_version* argument. Possible values (1 or 2)

## Set secrets
It is a good practice not to set credentials like composer auth in the code source (see https://12factor.net).
So it is advised to use github secret instead of fill the value in the main.yml of your workflow.
Expand Down

0 comments on commit 55aba29

Please sign in to comment.