Skip to content

Import fix

Import fix #60

Workflow file for this run

name: PHP tests
on: push
jobs:
phpunit-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 8.2, 8.1 ]
laravel: [ 10.* ]
stability: [ prefer-lowest, prefer-stable ]
include:
- laravel: 10.*
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Copy .env
working-directory: ./password-manager
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install dependencies
working-directory: ./password-manager
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Generate key
working-directory: ./password-manager
run: php artisan key:generate
- name: Create SQLite database
working-directory: ./password-manager
run: |
mkdir -p database
touch database/database.sqlite
- name: Run migrations
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
working-directory: ./password-manager
run: php artisan migrate
- name: Execute PHP tests
working-directory: ./password-manager
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php artisan test