Merge pull request #4 from JustSteveKing/feature/model-stats #13
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: Run Tests | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
run-tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
extensions: xdebug, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | |
tools: phpstan, composer:v2 | |
coverage: xdebug | |
- name: Cache npm dependencies | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: npm-${{ hashFiles('package-lock.json') }} | |
- name: Run npm | |
run: npm install && npm run build | |
- name: Run composer install | |
run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: composer-${{ hashFiles('composer.lock') }} | |
- name: Prepare Laravel Application | |
run: | | |
cp .env.example .env | |
php artisan key:generate | |
- name: Run tests | |
run: composer test |