[Snyk] Security upgrade eslint from 8.28.0 to 9.15.0 #4
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: Tests (PHP) | |
on: [pull_request] | |
jobs: | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | |
with: | |
php-version: '8.3' | |
extensions: mbstring, dom, fileinfo, mysql, libxml, xml, xmlwriter, dom, tokenizer, filter, json, phar, pcre, openssl, pdo, intl, curl | |
- name: Cache composer dependencies | |
uses: actions/cache@v1 | |
with: | |
path: vendor | |
key: composer-${{ hashFiles('composer.lock') }} | |
#- name: Run composer install | |
# run: composer install -n --prefer-dist | |
# env: | |
# APP_ENV: testing | |
- name: Prepare Laravel Application | |
run: | | |
cp .env.example .env | |
php artisan key:generate | |
- name: Cache yarn dependencies | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: yarn-${{ hashFiles('yarn.lock') }} | |
- name: Run yarn | |
run: yarn && yarn dev | |
- name: Run ESLint | |
run: yarn lint | |
- name: Run tests | |
run: php artisan test | |
env: | |
APP_ENV: testing | |
- name: Php code sniffer | |
run: ./vendor/bin/phpcs --config-set ignore_warnings_on_exit 1 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@master | |
if: failure() | |
with: | |
name: Logs | |
path: ./storage/logs |