Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test removing licence #74

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/licences.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Integration tests
on:
push:
pull_request:
# Do not run when only tests are updated
paths-ignore:
- 'tests/UI/**'

permissions:
contents: read # to clone the repos and get release assets (shivammathur/setup-php)
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
licences:
permissions:
contents: read # to clone the repos and get release assets (shivammathur/setup-php)
name: Licences check
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
mysql version: '8.0'
mysql database: 'prestashop'
mysql root password: 'password'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Setup NPM
run: npm install -g npm@7

- uses: actions/checkout@v3

- name: PrestaShop Configuration
run: |
cp .github/workflows/phpunit/parameters.yml app/config/parameters.yml
cp .github/workflows/phpunit/parameters.php app/config/parameters.php

- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Node Directory
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-

- name: Cache Composer Directory
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress

- name: Update phpunit version
if: ${{ startsWith(matrix.php, '8.') }}
run: composer update -w --ignore-platform-reqs --no-interaction phpunit/phpunit

- name: Build theme assets
run: make front-classic

- name: Change MySQL authentication method
run: mysql -h127.0.0.1 -uroot -ppassword -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; FLUSH PRIVILEGES;"

- name: Run licences update
run: php bin/console prestashop:licenses:update
env:
SYMFONY_DEPRECATIONS_HELPER: disabled

- name: Test git versionned files unchanged
if: ${{ !startsWith(matrix.php, '8.') }} # composer.lock changes when updating phpunit version
run: git diff --exit-code
24 changes: 0 additions & 24 deletions classes/Product.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <[email protected]>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/

use PrestaShop\Decimal\DecimalNumber;
use PrestaShop\PrestaShop\Adapter\ServiceLocator;
Expand Down