Skip to content

Commit

Permalink
Merge branch 'dev' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienPlx authored Nov 24, 2023
2 parents fbafb0e + b517c29 commit 5e760cd
Showing 344 changed files with 3,526 additions and 18,855 deletions.
6 changes: 4 additions & 2 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM prestashop/base:7.2-apache
ARG BASE_VERSION

FROM prestashop/base:$BASE_VERSION
LABEL maintainer="PrestaShop Core Team <coreteam@prestashop.com>"

ARG VERSION
ENV PS_VERSION $VERSION

# Get PrestaShop
ADD https://www.prestashop.com/download/old/prestashop_${PS_VERSION}.zip /tmp/prestashop.zip
ADD https://github.com/PrestaShop/PrestaShop/releases/download/${PS_VERSION}/prestashop_${PS_VERSION}.zip /tmp/prestashop.zip

# Extract
RUN mkdir -p /tmp/data-ps \
14 changes: 0 additions & 14 deletions .github/Dockerfile-7.1

This file was deleted.

4 changes: 3 additions & 1 deletion .github/action.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,9 @@ runs:
VERSION: ${{ matrix.from }}
shell: bash
run: |
bash -c '[[ "${VERSION}" == 1.6* ]] && docker-compose -f docker-compose-7.1.yml up -d || docker-compose -f docker-compose.yml up -d'
bash -c 'if [[ "${VERSION}" == 1.6* ]]; then export BASE_VERSION=7.1-apache; \
elif [[ "${VERSION}" == 8.* ]]; then export BASE_VERSION=8.1-apache; \
else export BASE_VERSION=7.2-apache; fi && docker compose up -d'
bash -c 'while [[ "$(curl -L -s -o /dev/null -w %{http_code} http://localhost:8001/index.php)" != "200" ]]; do sleep 5; done'
- name: Copy autoupgrade module
shell: bash
2 changes: 1 addition & 1 deletion .github/get_matrix.php
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

$matrix = [];

$nightlyEndpoint = "https://api-nightly.prestashop.com/reports";
$nightlyEndpoint = "https://api-nightly.prestashop-project.org/reports";

$reports = json_decode(file_get_contents($nightlyEndpoint), true);
$currentDate = "";
61 changes: 3 additions & 58 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -2,61 +2,6 @@ name: Build
on: [push, pull_request]

jobs:
deploy:
name: build dependencies & create artifact
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
- name: Install composer dependencies
run: composer install --no-dev -o
- name: Clean-up project
uses: PrestaShopCorp/github-action-clean-before-deploy@v1.0
- name: Prepare auto-index tool
run: |
composer global require prestashop/autoindex
- name: Generate index.php
run: |
~/.composer/vendor/bin/autoindex
- name: Create & upload artifact
uses: actions/upload-artifact@v1
with:
name: ${{ github.event.repository.name }}
path: ../
update_release_draft:
runs-on: ubuntu-latest
needs: [deploy]
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
steps:
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: ${{ github.event.repository.name }}
- id: release_info
uses: toolmantim/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare for Release
run: |
cd ${{ github.event.repository.name }}
zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }}
- name: Clean existing assets
shell: bash
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
assets=`bin/hub api -t repos/${{ github.repository }}/releases/${{ steps.release_info.outputs.id }}/assets | awk '/\].url/ { print $2 }'`
for asset in $assets
do
bin/hub api -X DELETE $asset
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to GitHub Release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_info.outputs.upload_url }}
asset_path: ./${{ github.event.repository.name }}/${{ github.event.repository.name }}.zip
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
build-and-release-draft:
name: Build & Release draft
uses: PrestaShop/.github/.github/workflows/build-release.yml@master
22 changes: 11 additions & 11 deletions .github/workflows/e2e_nightly_upgrade.yml
Original file line number Diff line number Diff line change
@@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16

- name: Install dependencies
shell: bash
@@ -32,7 +32,7 @@ jobs:
shell: bash
run: echo "::set-output name=TARGET_VERSIONS::$(node ./scripts/getTargetVersions.js)"
env:
API_URL: https://api-nightly.prestashop.com/reports
API_URL: https://api-nightly.prestashop-project.org/reports
working-directory: ./tests/e2e

outputs:
@@ -61,7 +61,7 @@ jobs:
steps:

# Setup PrestaShop and Install Autoupgrade module
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0

- run: |
cp -r .github .github_dev
@@ -94,9 +94,9 @@ jobs:

# Install Module with user interface
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16

- name: Install dependencies
run: npm install
@@ -162,7 +162,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0

- uses: actions/download-artifact@v2
name: Download reports
@@ -173,7 +173,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 16

- name: Install dependencies
shell: bash
@@ -206,7 +206,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0

- uses: actions/download-artifact@v2
name: Download report
@@ -228,6 +228,6 @@ jobs:
cp ${{ env.reports_directory }}/${{ env.combined_report_name }} $FILENAME
./.github/workflows/nightly_scripts/push_results.sh ${{ env.nightly_api_url }} $FILENAME ${{ env.campaign }} ${{ env.platform }} ${{ secrets.QANB_TOKEN }}
env:
nightly_api_url: https://api-nightly.prestashop.com/hook/reports/import
nightly_api_url: https://api-nightly.prestashop-project.org/hook/reports/import
campaign: autoupgrade
platform: chromium
20 changes: 9 additions & 11 deletions .github/workflows/nightly_upgrade.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ jobs:
name: Set up matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
@@ -22,24 +22,22 @@ jobs:
strategy:
fail-fast: false
matrix:
from: ['1.7.6.9', '1.7.7.0', '1.6.1.24']
from: ['8.0.4', '1.7.6.9', '1.7.7.0']
ps-versions: ${{ fromJson(needs.get_matrix.outputs.matrix) }}
branch: ['dev', 'master']
exclude:
- from: '1.6.1.24'
branch: 'master'
- from: '1.7.6.9'
ps-versions: {branch: 'develop'}
branch: 'master'
- from: '1.7.7.0'
ps-versions: {branch: 'develop'}
branch: 'master'
- from: '8.0.4'
ps-versions: { branch: '1.7.8.x' }
runs-on: ubuntu-latest
name: Upgrade
name: Upgrade (${{ matrix.branch }}) - From ${{ matrix.from }} to ${{ matrix.ps-versions.version }}
outputs:
result: ${{ steps.export-result.outputs.result }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
- if: ${{ matrix.branch != 'dev' }}
run: |
cp -r .github .github_dev
@@ -66,7 +64,7 @@ jobs:
name: ${{ matrix.branch }}_${{matrix.from}}_${{matrix.ps-versions.branch}}
path: ${{ matrix.branch }}_${{matrix.from}}_${{matrix.ps-versions.branch}}.txt
results:
name: Results
name: Results ${{ matrix.ps-versions.version }}
continue-on-error: true
runs-on: ubuntu-latest
needs:
@@ -76,7 +74,7 @@ jobs:
matrix:
ps-versions: ${{ fromJson(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
- uses: actions/download-artifact@v2
with:
path: ./artifacts/
@@ -93,6 +91,6 @@ jobs:
export FILENAME=autoupgrade_`date -u +"%Y-%m-%d"`-${{matrix.ps-versions.branch}}.json
./.github/workflows/nightly_scripts/push_results.sh ${{ env.nightly_api_url }} $FILENAME ${{ env.campaign }} ${{ env.platform }} ${{ secrets.QANB_TOKEN }}
env:
nightly_api_url: https://api-nightly.prestashop.com/hook/add
nightly_api_url: https://api-nightly.prestashop-project.org/hook/add
campaign: autoupgrade
platform: cli
24 changes: 11 additions & 13 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
uses: actions/checkout@v3.1.0

- name: PHP syntax checker 5.6
uses: prestashop/github-action-php-lint/5.6@master
@@ -50,21 +50,19 @@ jobs:
php-version: '5.6'

- name: Checkout
uses: actions/checkout@v2.0.0
uses: actions/checkout@v3.1.0

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}

- name: Install dependencies
run: |
composer global require friendsofphp/php-cs-fixer
composer global require prestashop/php-dev-tools
- name: Composer Install
run: composer install --prefer-dist

- name: Run PHP-CS-Fixer
run: php-cs-fixer fix --dry-run --diff --using-cache=no
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no

php-unit:
strategy:
@@ -78,7 +76,7 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv, ext-zip
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
with:
fetch-depth: 0

@@ -91,21 +89,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
presta-versions: ['1.6.1.18', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', '8.0.0', 'latest']
presta-versions: ['1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', '8.0.0', 'latest']
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
uses: actions/checkout@v3.1.0

# Add vendor folder in cache to make next builds faster
- name: Cache vendor folder
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}

# Add composer local folder in cache to make next builds faster
- name: Cache composer folder
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: php-composer-cache
4 changes: 2 additions & 2 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
@@ -4,14 +4,14 @@ jobs:
upgrade:
strategy:
matrix:
from: ['1.6.1.11', '1.7.6.9', '1.7.6.1', '1.7.7.0']
from: ['1.7.6.9', '1.7.6.1', '1.7.7.0']
ps-versions:
- channel: minor
- channel: major
runs-on: ubuntu-latest
name: Upgrade
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
- name: Composer Install
run: composer install
- name: Upgrade & Rollback
Loading

0 comments on commit 5e760cd

Please sign in to comment.