Fix pull request pipeline vulnerabilities and weaknesses check #6
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: Pull Request Pipeline | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| pull_request_pipeline: | |
| name: Pull Request Pipeline | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| - uses: actions/cache@v4 | |
| id: cache-db | |
| with: | |
| path: ~/.symfony/cache | |
| key: db | |
| - uses: symfonycorp/security-checker-action@v4 | |
| - uses: php-actions/composer@v6 | |
| - name: Build package | |
| run: | | |
| sudo chown -R $USER:$USER . | |
| composer install --prefer-dist --no-progress | |
| composer dump-autoload --optimize | |
| composer validate | |
| - name: Check code style | |
| run: ./vendor/bin/pint --test | |
| - name: Check security | |
| run: ./vendor/bin/phpcs --extensions=php,inc,lib,module,info --standard=./vendor/pheromone/phpcs-security-audit/example_base_ruleset.xml ./src/ || true |