Adapat code for category reindex #1053
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: Phan | |
on: [push] | |
jobs: | |
phan: | |
name: Phan Analysis | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
############################################################################ | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
tools: composer:v2, pecl | |
coverage: none | |
extensions: ast, bcmath, gd, pdo_mysql, zip, soap | |
- name: Cache composer packages | |
id: composer-cache | |
run: | | |
composer config cache-files-dir | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Update project dependencies | |
env: | |
REPO_USR: ${{ secrets.REPO_USR }} | |
REPO_PSW: ${{ secrets.REPO_PSW }} | |
run: | | |
composer config repositories.0 composer https://repo.magento.com | |
composer config http-basic.repo.magento.com "$REPO_USR" "$REPO_PSW" | |
composer install --prefer-dist --no-progress --no-suggest | |
############################################################################ | |
- name: Install Magento | |
id: install-magento | |
run: | | |
composer create-project magento/community-edition=2.4.4 magento --no-dev | |
cd magento | |
composer config minimum-stability dev | |
composer config prefer-stable true | |
composer require --no-update nosto/module-nostotagging:dev-${GITHUB_REF#refs/heads/}#${GITHUB_SHA} | |
composer update --no-dev | |
bin/magento module:enable --all | |
bin/magento setup:di:compile | |
cd .. | |
cp -r magento/generated vendor/magento/ | |
rm -rf magento | |
env: | |
GITHUB_BRANCH: ${{ github.base_ref }} | |
- name: Run Phan analysis | |
id: phan-analysis | |
run: | | |
./vendor/bin/phan --config-file=phan.php --output-mode=checkstyle --output=chkphan.xml | |
continue-on-error: true | |
- name: Archive static analysis results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: phan-analysis-results | |
path: chkphan.xml | |
- name: Report annotations | |
id: report-annotations | |
run: ./vendor/bin/cs2pr chkphan.xml |