As we know, Security Pull requests are hidden on PrestaShop/PrestaShop repository, So it's hard to launch Automatic tests on it. For this purpose, we did create a new workflow called Testing Security PrestaShop pull requests (without cache).
Before you start testing you need to make sure that NO ACCESS ARE GRANTED on where you test, and since you can make a fork of public repository private (Github policy), you need to create a new private one, following these steps :
- Go to your Profile -> Repositories then click on New
- Add a name and Make it PRIVATE
-
Then Create The Repository
-
Once created, click on Import Code below page
- Add Link to PrestaShop/ga.test.ui.pr and click on Begin import
- Congrats, your Repository is Ready.
When a new private Repository is created with Import, Actions are disabled, you should enable it, To do that, you have to :
-
Go To Your Repository -> Setting -> Actions General
-
Check
Allow all actions and reusable workflows
-
Click on Save
- Congrats, Actions are available now
A token will serve to access the private repository of the pull request, you can refer to this tutorial to do so. You need to only check this part on the setting
Copy Your token and Keep it safe
PS: You can set the expiration date to the minimum (7 days) so it can not be used a lot.
Congratulations 🎉, You can now test the security pull request.
You can use the private repository you created following these steps :
-
Click on Actions Tab
-
On Actions Tab, Click on the workflow name on the list
Testing Security PrestaShop pull requests
-
Once on the workflow, Click on Run Workflow
-
Fill the form and submit the workflow
Parameter | Description | Default |
---|---|---|
Pull request private repository |
The Name of the fork to use (ex PrestaShop/PrestaShop-abc-xyz ) |
No default value, you must fill it to submit |
Github token |
The Token will serve to access the repository (created and copied earlier) | No default value, you must fill it to submit |
Pull request Id |
ID of Pull request on PrestaShop/PrestaShop-abc-xyz repository |
No default value, you must fill it to submit |
Base Branch |
Target Branch of you pull request (ex: 8.0.x, develop) | develop |
DEV Mode |
Enable/Disable the developer mode | false |
PHP version |
PHP version to use to setup PrestaShop environment | 8.1 |
Node Version |
Node version to use to setup PrestaShop environment | 14 |
After finishing the tests, when you finally validate the pull request(s), you should clean behind by: