Merge pull request #226 from STEMMechanics/fix/equipment-product-details #654
This file contains hidden or 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: SAST | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| semgrep: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install Semgrep | |
| run: | | |
| python3 -m venv /tmp/semgrep-venv | |
| /tmp/semgrep-venv/bin/pip install --upgrade pip | |
| /tmp/semgrep-venv/bin/pip install semgrep | |
| - name: Run Semgrep | |
| run: /tmp/semgrep-venv/bin/semgrep scan --config p/php | |
| phpstan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| tools: composer:v2 | |
| extensions: imagick, mbstring, fileinfo, zip, redis | |
| - name: Cache Composer | |
| uses: actions/cache@v6 | |
| with: | |
| path: /tmp/composer-cache | |
| key: composer-${{ runner.os }}-${{ hashFiles('composer.lock') }} | |
| restore-keys: | | |
| composer-${{ runner.os }}- | |
| - name: Install PHP Dependencies | |
| env: | |
| COMPOSER_CACHE_DIR: /tmp/composer-cache | |
| run: composer install --no-interaction --no-progress --prefer-dist --ignore-platform-req=ext-redis | |
| - name: Run PHPStan | |
| run: vendor/bin/phpstan analyse --no-progress --memory-limit=1G |