Skip to content

Commit

Permalink
Fix conflits
Browse files Browse the repository at this point in the history
  • Loading branch information
PululuK committed Sep 23, 2023
2 parents 3ba1890 + d294c4b commit 719542a
Show file tree
Hide file tree
Showing 2,310 changed files with 63,855 additions and 32,950 deletions.
17 changes: 12 additions & 5 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ EXPOSE 443

ARG GROUP_ID
ARG USER_ID
ARG NODE_VERSION

RUN groupmod -g $GROUP_ID www-data \
&& usermod -u $USER_ID -g $GROUP_ID www-data
Expand All @@ -19,13 +20,19 @@ RUN chown -R www-data:www-data /var/www/.npm
RUN mkdir -p /var/www/.composer
RUN chown -R www-data:www-data /var/www/.composer

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt install -y nodejs
ENV NVM_DIR /usr/local/nvm
RUN mkdir -p $NVM_DIR \
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default

ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin
ENV PATH $PATH:$NODE_PATH

# Install mailutils to make sendmail work
RUN apt install -y \
apt-utils \
mailutils
RUN apt update && apt install -y mailutils

RUN php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" && php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer && rm -rf /tmp/composer-setup.php
CMD ["/tmp/docker_run_git.sh"]
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# You can specify here some variables to use in PrestaShop application
# -> enable a feature flag: PS_FF_{FEATURE_FLAG_NAME}=true

# Enable new Symfony based front container
PS_FF_FRONT_CONTAINER_V2=false
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PS_CONTAINER_V2_FRONT=false
13 changes: 7 additions & 6 deletions .github/ISSUE_TEMPLATE/1_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this bug report. Please take the time to provide as much details as possible. Following our [bug report guidelines](https://devdocs.prestashop-project.org/8/contribute/contribute-reporting-issues/#best-practices-for-writing-an-issue) will help maintainers qualify your report faster.
Reporting bugs with "error 500" or "white page" may not help us reproduce them. This is a universal error that hides what is underneath. Instead, enable debug mode in the Performance section of PrestaShop and try again. You should get a proper error message.
🇬🇧 Use English, reports in all other languages will be closed.
### ❗️ Read this before submitting your bug report:
- **Write in English.** Reports in all other languages will be closed.
- **Provide as much detail as possible** - error logs, screenshots, your exact configuration. If the issue cannot be reproduced, it cannot be fixed.
- **Follow the [bug report guidelines](https://devdocs.prestashop-project.org/8/contribute/contribute-reporting-issues/#best-practices-for-writing-an-issue).** This will help issue managers qualify your report faster.
- **Avoid reporting "error 500" or "white page" errors** - this is a universal error message that does not provide enough information to qualify the issue. Enable debug mode in the Performance section of PrestaShop or manually in `/config/defines.inc.php` and try again. You should get a proper error message.
- If reporting a problem with the upgrade process, open `/admin/autoupgrade/tmp` and attach the last part of `log.txt` to the issue. It may contain information about the upgrade errors helpful in resolving the issue. Do not upload the entire `log.txt` as it contains sensitive data.
- type: checkboxes
attributes:
label: Prerequisites
Expand All @@ -22,7 +23,7 @@ body:
id: what-happened
attributes:
label: Describe the bug and add attachments
description: What went wrong? If applicable, add screenshots, error logs or screen recordings to help explain your problem.
description: What went wrong? If possible, add screenshots, error logs or screen recordings to help explain your problem.
validations:
required: true
- type: textarea
Expand Down
5 changes: 3 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ https://devdocs.prestashop-project.org/8/contribute/contribution-guidelines/pull

| Questions | Answers
| ----------------- | -------------------------------------------------------
| Branch? | develop / 8.1.x / 8.0.x / 1.7.8.x
| Branch? | develop / 8.1.x
| Description? | Please be specific when describing the PR. <br> Every detail helps: versions, browser/server configuration, specific module/theme, etc. Feel free to add more information below this table.
| Type? | bug fix / improvement / new feature / refacto
| Category? | FO / BO / CO / IN / WS / TE / LO / ME / PM
| BC breaks? | yes / no
| Deprecations? | yes / no
| How to test? | Indicate how to verify that this change works as expected.
| Fixed ticket? | Fixes #{issue number here}, Fixes #{another issue number here}
| UI Tests | Please run UI tests and paste here the link to the run. [Read this page to know why and how to use this tool.](https://devdocs.prestashop-project.org/8/contribute/contribution-guidelines/ui-tests/).
| Fixed issue or discussion? | Fixes #{issue number here}, Fixes #{another issue number here}, Fixes https://github.com/PrestaShop/PrestaShop/discussions/ {discussion number here}
| Related PRs | If theme, autoupgrade or other module change is needed to make this change work, provide a link to related PRs here.
| Sponsor company | Your company or customer's name goes here (if applicable).
59 changes: 0 additions & 59 deletions .github/workflows/cron_nightly_gcp.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/cron_nightly_tests_1.7.8.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This workflow aim to run all UI tests on active branches
# and upload the report on Google cloud platform storage
name: Nightly tests and report - 1.7.8.x

on:
workflow_run:
workflows: [ 'Nightly Build' ]
types:
- requested

jobs:
test_1_7_8_x:
uses: ./.github/workflows/cron_nightly_tests_reusable.yml
with:
BRANCH: 1.7.8.x
secrets:
GC_PROJECT_ID: ${{ secrets.GC_PROJECT_ID }}
GC_SERVICE_KEY: ${{ secrets.GC_SERVICE_KEY }}
API_NIGHTLY_IMPORT_TOKEN: ${{ secrets.NIGHTLY_TOKEN }}
54 changes: 48 additions & 6 deletions .github/workflows/cron_nightly_tests_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
- 'functional:BO:shop-parameters:05-07'
- 'functional:BO:advanced-parameters:01-06'
- 'functional:BO:advanced-parameters:07-10'
- 'functional:BO:advanced-parameters:11-12'
- 'functional:BO:header'
- 'functional:FO:01-03'
- 'functional:FO:04-07'
Expand All @@ -92,9 +93,36 @@ jobs:
- 'modules'
- 'regression'
exclude:
## 1.7.8.x
- BRANCH: 1.7.8.x
CAMPAIGN: 'cldr'
- BRANCH: 1.7.8.x
CAMPAIGN: 'functional:BO:advanced-parameters:11-12'
- BRANCH: 1.7.8.x
CAMPAIGN: 'functional:BO:dashboard'
- BRANCH: 1.7.8.x
CAMPAIGN: 'functional:productV2'
- BRANCH: 1.7.8.x
CAMPAIGN: 'functional:API'
- BRANCH: 1.7.8.x
CAMPAIGN: 'functional:FO:classic:01-03'
- BRANCH: 1.7.8.x
CAMPAIGN: 'functional:FO:classic:04-07'
- BRANCH: 1.7.8.x
CAMPAIGN: 'functional:FO:classic:08-12'
- BRANCH: 1.7.8.x
CAMPAIGN: 'functional:FO:hummingbird:01-03'
- BRANCH: 1.7.8.x
CAMPAIGN: 'functional:WS'
- BRANCH: 1.7.8.x
CAMPAIGN: 'modules'
- BRANCH: 1.7.8.x
CAMPAIGN: 'sanity:productV2'
## 8.0.x
- BRANCH: 8.0.x
CAMPAIGN: 'cldr'
- BRANCH: 8.0.x
CAMPAIGN: 'functional:BO:advanced-parameters:11-12'
- BRANCH: 8.0.x
CAMPAIGN: 'functional:BO:dashboard'
- BRANCH: 8.0.x
Expand All @@ -114,6 +142,8 @@ jobs:
- BRANCH: 8.0.x
CAMPAIGN: 'modules'
## 8.1.x
- BRANCH: 8.1.x
CAMPAIGN: 'functional:BO:advanced-parameters:11-12'
- BRANCH: 8.1.x
CAMPAIGN: 'functional:FO:01-03'
- BRANCH: 8.1.x
Expand All @@ -127,6 +157,8 @@ jobs:
CAMPAIGN: 'functional:FO:04-07'
- BRANCH: develop
CAMPAIGN: 'functional:FO:08-12'
- BRANCH: develop
CAMPAIGN: 'sanity:productV2'

env:
GH_BRANCH: ${{ matrix.BRANCH }} # Branch to test
Expand All @@ -135,14 +167,14 @@ jobs:
PS_LANGUAGE: 'en'
PS_INSTALL_AUTO: 1
PS_DEV_MODE: 0
PS_ENABLE_SSL: ${{ matrix.BRANCH == '8.0.x' && '0' || '1' }}
PS_DOMAIN: ${{ matrix.BRANCH == '8.0.x' && 'localhost:8001' || 'localhost:8002' }}
PS_ENABLE_SSL: ${{ ((matrix.BRANCH == '8.0.x') || (matrix.BRANCH == '1.7.8.x')) && '0' || '1' }}
PS_DOMAIN: ${{ ((matrix.BRANCH == '8.0.x') || (matrix.BRANCH == '1.7.8.x')) && 'localhost:8001' || 'localhost:8002' }}
DB_SERVER: 'mysql'
DB_NAME: 'prestashop'
DB_PREFIX: 'tst_'
DB_USER: 'root'
DB_PASSWD: 'prestashop'
ADMIN_PASSWD: 'Correct Horse Battery Staple'
ADMIN_PASSWD: ${{ (matrix.BRANCH == '1.7.8.x') && 'prestashop_demo' || 'Correct Horse Battery Staple' }}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -177,7 +209,7 @@ jobs:
- name: Build and run shop with docker
timeout-minutes: 15
env:
URL_FO: ${{ env.GH_BRANCH == '8.0.x' && 'http://localhost:8001/' || 'https://localhost:8002/' }}
URL_FO: ${{ ((env.GH_BRANCH == '8.0.x') || (env.GH_BRANCH == '1.7.8.x')) && 'http://localhost:8001/' || 'https://localhost:8002/' }}
run: |
USER_ID=$(id -u) GROUP_ID=$(id -g) \
docker-compose -f docker-compose.yml up -d --build
Expand All @@ -192,13 +224,18 @@ jobs:
working-directory: ${{ inputs.TESTS_DIR }}
run: npm ci

- name: Install browsers
working-directory: ${{ inputs.TESTS_DIR }}
if: env.GH_BRANCH != '1.7.8.x'
run: npx playwright install --with-deps

# Run tests (if error, we continue for uploading report)
- name: Run tests
continue-on-error: true
working-directory: ${{ inputs.TESTS_DIR }}
env:
URL_FO: ${{ env.GH_BRANCH == '8.0.x' && 'http://localhost:8001/' || 'https://localhost:8002/' }}
ENABLE_SSL: true
URL_FO: ${{ ((env.GH_BRANCH == '8.0.x') || (env.GH_BRANCH == '1.7.8.x')) && 'http://localhost:8001/' || 'https://localhost:8002/' }}
ENABLE_SSL: ${{ ((matrix.BRANCH == '8.0.x') || (matrix.BRANCH == '1.7.8.x')) && false || true }}
SMTP_SERVER: '172.17.0.1'
run: npm run ${{ env.TEST_CAMPAIGN }}

Expand Down Expand Up @@ -259,6 +296,11 @@ jobs:
working-directory: ${{ inputs.TESTS_DIR }}
run: npm ci

- name: Install browsers
working-directory: ${{ inputs.TESTS_DIR }}
if: env.GH_BRANCH != '1.7.8.x'
run: npx playwright install --with-deps

- name: Combine reports
working-directory: ${{ inputs.TESTS_DIR }}
env:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/cron_php_update_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
BRANCH:
- develop
- 8.1.x
- 8.0.x
env:
GH_BRANCH: ${{ matrix.BRANCH }}

Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/sanity-productV2.yml

This file was deleted.

10 changes: 9 additions & 1 deletion .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@ jobs:
run: mv .env.ci .env
working-directory: ./tests/UI

- name: Install dependencies
working-directory: ./tests/UI
run: npm ci

- name: Install browsers
working-directory: ./tests/UI
run: npx playwright install --with-deps

- name: Run tests
run: npm ci && npm run test:sanity:fast-fail
run: npm run test:sanity:fast-fail
working-directory: ./tests/UI
env:
ENABLE_SSL: true
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ui_tests_code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- name: Install dependencies in UI tests directory
run: npm ci

- name: Install browsers
run: npx playwright install --with-deps

- name: Check eslint errors
run: npm run lint

Expand All @@ -64,9 +67,6 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}

- name: Setup NPM
run: npm install -g npm@${{ env.NPM_VERSION }}

- name: Install dependencies in UI tests directory
run: npm install

Expand Down Expand Up @@ -95,6 +95,9 @@ jobs:
- name: Install dependencies in UI tests directory
run: npm ci

- name: Install browsers
run: npx playwright install --with-deps

- name: Generate mocha reports with failed steps
run: GENERATE_FAILED_STEPS=true npm run test:all
continue-on-error: true
Expand Down
Loading

0 comments on commit 719542a

Please sign in to comment.