Skip to content

Commit

Permalink
Merge pull request #344 from PrestaShopCorp/4.1.x
Browse files Browse the repository at this point in the history
v4.1.x
  • Loading branch information
intraordinaire authored Nov 22, 2022
2 parents 92763f1 + 37937df commit b9fe344
Show file tree
Hide file tree
Showing 203 changed files with 8,636 additions and 4,162 deletions.
66 changes: 8 additions & 58 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- 3.x
- 4.x
- 4.0.x
- 4.1.x

env:
LABELS: ${{toJSON(github.event.pull_request.labels)}}
Expand All @@ -29,74 +30,18 @@ jobs:
run: composer install --no-dev -o

- name: Clean-up project
uses: 'PrestaShopCorp/github-action-clean-before-deploy@v1.1'
uses: 'PrestaShopCorp/github-action-clean-before-deploy@v2.0'

- name: Cache module folder
uses: 'actions/cache@v3'
with:
path: ./
key: ${{ github.run_id }}

upload_prestabulle:
name: Create prestabulle zip
runs-on: ubuntu-latest
needs: deploy
if: contains(github.event.pull_request.labels.*.name, 'prestabulle1') ||
contains(github.event.pull_request.labels.*.name, 'prestabulle2') ||
contains(github.event.pull_request.labels.*.name, 'prestabulle3') ||
contains(github.event.pull_request.labels.*.name, 'prestabulle4') ||
contains(github.event.pull_request.labels.*.name, 'prestabulle5') ||
contains(github.event.pull_request.labels.*.name, 'prestabulle6') ||
contains(github.event.pull_request.labels.*.name, 'prestabulle7') ||
contains(github.event.pull_request.labels.*.name, 'prestabulle8') ||
contains(github.event.pull_request.labels.*.name, 'prestabulle9')
steps:

- name: Retrieve from cache module folder
id: retrieve-cache
uses: 'actions/cache@v3'
with:
path: ./
key: ${{ github.run_id }}

- name: Check if retrieved from cache was successful
if: steps.retrieve-cache.outputs.cache-hit != 'true'
run: exit 1

- name: Manually perform GCP CLI authentication
run: |
echo $GOOGLE_JSON_CRED > token.json
gcloud auth activate-service-account --key-file=token.json
rm token.json
env:
GOOGLE_JSON_CRED: ${{ secrets.G_CREDENTIAL_INTEGRATION }}

- name: Setting up Bubble variable
run: echo "BULLE=$BULLE$(echo $LABELS > labels.json && cat labels.json | jq -r '.[]|.name'|grep prestabulle)" >> $GITHUB_OUTPUT
id: get_bulle

- name: Copy env files
run: |
rm -f .env.dist
gcloud secrets versions access latest --project distribution-integration --secret=mbo-module-${{ steps.get_bulle.outputs.BULLE }}-env > .env
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.G_CREDENTIAL_INTEGRATION }}

- name: Prepare the zip
run: |
cd ..
zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
- name: Create & upload artifact for prestabulle
uses: 'actions/upload-artifact@v1'
with:
name: ${{ github.event.repository.name }}.${{ steps.get_bulle.outputs.BULLE }}
path: ../${{ github.event.repository.name }}.zip

upload_asset_preproduction:
runs-on: ubuntu-latest
needs: [deploy]
if: github.event_name == 'push' && (github.ref == 'refs/heads/4.x' || github.ref == 'refs/heads/4.0.x')
if: github.event_name == 'push' && (github.ref == 'refs/heads/4.x' || github.ref == 'refs/heads/4.0.x' || github.ref == 'refs/heads/4.1.x')
steps:

- name: Retrieve from cache module folder
Expand Down Expand Up @@ -169,6 +114,11 @@ jobs:
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.G_CREDENTIAL_PRODUCTION }}

- name: Remove test settings files
run: |
rm -f ./src/Traits/HaveConfigurationPage.php
sed -i '/HaveConfigurationPage/d' ps_mbo.php
- name: Prepare the production zip
run: |
cd ..
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
uses: actions/[email protected]
- name: Run PHP-CS-Fixer
uses: prestashopcorp/github-action-php-cs-fixer@master
with:
other-cmds: '--config=.php-cs-fixer.dist.php'
phpstan:
name: PHPStan
runs-on: ubuntu-latest
Expand Down
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,23 @@ config_*.xml
!/vendor/index.php
tests/.phpunit.result.cache
.env

## Directory-based project format:

### PhpStorm ###
.idea/

### NetBeans ###
nbproject/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/

### Eclipse ###
.buildpath
.project
.settings/
.externalToolBuilders/
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"prestashop/circuit-breaker": "^4",
"guzzlehttp/guzzle": "^7.4",
"ramsey/uuid": "^4.2",
"sentry/sdk": "^3.2",
"sentry/sdk": "^3.3",
"symfony/workflow": "^4.4.20",
"prestashop/prestashop-accounts-installer": "^1.0.1",
"prestashop/prestashop-accounts-installer": "^1.0",
"firebase/php-jwt": "^6.3"
},
"require-dev": {
Expand Down
Loading

0 comments on commit b9fe344

Please sign in to comment.