Skip to content

Merge pull request #355 from tighten/develop #467

Merge pull request #355 from tighten/develop

Merge pull request #355 from tighten/develop #467

Workflow file for this run

name: Test Build
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: PHP 8.1, Laravel 9.*
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- name: Cache Composer dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: php-8.1-laravel-9.*-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: php-8.1-laravel-9`.*-composer-
- name: Cache npm dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: npm-
- name: Copy ENV Laravel Configuration for CI
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install dependencies
run: |
composer install --prefer-dist --no-interaction --no-progress --no-suggest
npm install
- name: Build Assets
run: npm run prod
- name: Generate key
run: php artisan key:generate
- name: Create DB and schemas
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/novapackages.sqlite
run: |
mkdir -p database
touch database/novapackages.sqlite
php artisan migrate
- name: Run PHP tests
run: vendor/bin/phpunit --exclude-group integration