Forgot the actual error:
Test directory "/home/runner/work/project/project/./tests/Unit" not found
Error: Process completed with exit code 2.
My Github action is failing due to the file path.
Any ideas?
I'm using the almost default action there for Laravel:
name: Laravel
on:
push:
branches: [ dev, master ]
pull_request:
branches: [ dev, master ]
jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Install Node Dependencies
run: touch ~/.npmrc \
&& echo "@***:registry=http://npm.***.com/" > ~/.npmrc \
&& echo "//npm.***.com/:_authToken=\"${{ secrets.NPM_AUTH_TOKEN }}\"" >> ~/.npmrc \
&& echo "unsafe-perm=true" >> ~/.npmrc \
&& npm install
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/phpunit
Please or to participate in this conversation.