Can you share the error you are receiving?
Dec 26, 2020
9
Level 3
Github actions error.
name: build
on:
push:
branches: main
jobs:
test-php:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Generate key
run: |
php artisan key:generate
- name: Cache Clear
run: |
php artisan cache:clear
php artisan clear-compiled
- 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
What error in this jobs. There is no error 2 days before but I got error when I push my code today.
Level 3
I fixed my self
name: build
on:
push:
branches: main
jobs:
test-php:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
- name: Remove vendor
run: rm -rf vendor
- name: Remove composer file
run: rm composer.lock
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Generate key
run: |
php artisan key:generate
- name: Cache Clear
run: |
php artisan cache:clear
php artisan clear-compiled
- 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.