[ACCOUNT-2604] feat: verify shop authenticity #2298
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Accounts Quality Control PHP | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize, labeled] | |
jobs: | |
php-linter: | |
name: PHP Syntax check 5.6|7.2|7.3 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: PHP syntax checker 5.6 | |
uses: prestashop/github-action-php-lint/5.6@master | |
with: | |
folder-to-exclude: "! -path \"./tests/*\"" | |
- name: PHP syntax checker 7.2 | |
uses: prestashop/github-action-php-lint/7.2@master | |
with: | |
folder-to-exclude: "! -path \"./tests/*\"" | |
- name: PHP syntax checker 7.3 | |
uses: prestashop/github-action-php-lint/7.3@master | |
with: | |
folder-to-exclude: "! -path \"./tests/*\"" | |
php-cs-fixer: | |
name: PHP-CS-FIXER | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Run PHP-CS-Fixer | |
uses: prestashopcorp/github-action-php-cs-fixer@master | |
phpstan: | |
name: PHPStan for Prestashop ${{ matrix.presta-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# presta-versions: ["latest", "1.7.6.5", "1.6.1.21"] | |
presta-versions: ["1.7.7.8-7.1", "1.6.1.24-7.1"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Scoped dependencies | |
run: make php-scoper | |
- name: PHPStan | |
run: | | |
make phpstan-${{ matrix.presta-versions }} | |
phpunit: | |
name: PHPUNIT for Prestashop ${{ matrix.presta-versions }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
presta-versions: ["1.6.1.24-5.6-fpm-stretch", "1.6.1.24-7.1", "1.7.8.5-7.4", "8.1.5-7.4", "nightly"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Scoped dependencies | |
run: make php-scoper | |
- name: PHPUnit tests | |
run: | | |
make phpunit-${{ matrix.presta-versions }} | |
# alternatively : | |
# - name: Platform build | |
# run: | | |
# make platform-${{ matrix.presta-versions }} | |
# | |
# - name: PHPUnit | |
# run: | | |
# make phpunit | |
# | |
# - name: PHPStan | |
# run: | | |
# make phpstan | |
header-stamp: | |
name: Check license headers | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Cache vendor folder | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: php-${{ hashFiles('composer.lock') }} | |
- name: Cache composer folder | |
uses: actions/cache@v3 | |
with: | |
path: ~/.composer/cache | |
key: php-composer-cache | |
- run: composer install | |
- name: Run Header Stamp in Dry Run mode | |
run: php vendor/bin/header-stamp --license=vendor/prestashop/header-stamp/assets/afl.txt --exclude=.github,node_modules,vendor,vendor,tests,_dev --dry-run | |
notify-earth: | |
if: ${{ github.event.action == 'labeled' && github.event.label.name == 'ready to review' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Notify everyone when PR is ready to be reviewed | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_COLOR: 2986CC | |
SLACK_TITLE: 👀 it's review time! | |
SLACK_MESSAGE: "🥷 ${{ github.event.pull_request.title }}" | |
SLACK_FOOTER: "https://github.com/PrestaShopCorp/ps_accounts/pull/${{ github.event.pull_request.number }}" | |
SLACK_USERNAME: QABot | |
SLACK_CHANNEL: squad-account-dev | |
SLACK_ICON: https://avatars.githubusercontent.com/u/56089550?s=48&v=4 |