-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from avored/dev
Dev to master
- Loading branch information
Showing
164 changed files
with
3,365 additions
and
3,697 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,42 @@ | ||
name: AvoRed | ||
name: "Run Tests" | ||
|
||
on: [push] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
avored-tests: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
# php: ['7.2', '7.3', '7.4'] | ||
php: ['7.2'] | ||
laravel: ['5.8.*'] | ||
include: | ||
- laravel: '5.8.*' | ||
testbench: '3.8.*' | ||
|
||
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- 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 | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v1 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" --no-interaction --no-update | ||
composer update --prefer-stable --prefer-dist --no-interaction --no-suggest | ||
- name: Execute tests | ||
run: vendor/bin/phpunit |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Str; | ||
use Faker\Generator as Faker; | ||
use AvoRed\Framework\Database\Models\Product; | ||
|
||
$factory->define(Product::class, function (Faker $faker) { | ||
$name = $faker->sentence; | ||
|
||
return [ | ||
'name' => $name, | ||
'slug' => Str::slug($name), | ||
'type' => 'BASIC', | ||
'sku' => Str::slug($name), | ||
'barcode' => $faker->randomNumber(4), | ||
'description' => $faker->sentence(3000), | ||
'status' => 1, | ||
'in_stock' => 1, | ||
'track_stock' => 1, | ||
'qty' => rand(100, 300), | ||
'is_taxable' => 1, | ||
'price' => $faker->randomNumber(2), | ||
'cost_price' => $faker->randomNumber(2), | ||
'weight' => $faker->randomNumber(2), | ||
'height' => $faker->randomNumber(2), | ||
'width' => $faker->randomNumber(2), | ||
'length' => $faker->randomNumber(2), | ||
'meta_title' => $faker->sentence, | ||
'meta_description' => $faker->sentence, | ||
]; | ||
}); |
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
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
Oops, something went wrong.