Add GitHub Actions (#97)
* Add GitHub Actions * Update branches trigger * Fix .env file * Fix default database connection * Add test step * Normalize PHP version * Update main.yml * Add more jobs * Fix YAML syntax error * Fix YAML syntax error * Attempt to fix Windows job * Update main.yml * Update main.yml * Update main.yml * Attempt to use MySQL * Update main.yml * Fix possible error
This commit is contained in:
parent
deab8be4a8
commit
e91185461a
@ -12,7 +12,7 @@ APP_ENV = production
|
||||
WEBPACK_ENV = production
|
||||
|
||||
# Database Configuration
|
||||
DB_CONNECTION = dummy
|
||||
DB_CONNECTION = mysql
|
||||
DB_HOST = localhost
|
||||
DB_PORT = 3306
|
||||
DB_DATABASE = blessingskin
|
||||
|
30
.github/workflows/main.yml
vendored
Normal file
30
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
php73:
|
||||
name: PHP 7.3
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest
|
||||
- name: Run tests
|
||||
run: |
|
||||
php -v
|
||||
mysql -uroot -proot -e 'create database if not exists test;'
|
||||
./vendor/bin/phpunit
|
||||
env:
|
||||
APP_ENV: testing
|
||||
frontend:
|
||||
name: Front End
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
- name: Run tests
|
||||
run: |
|
||||
yarn lint
|
||||
yarn test
|
@ -371,7 +371,8 @@ class PluginManager
|
||||
? [$name => compact('version', 'constraint')]
|
||||
: [];
|
||||
} elseif ($name == 'php') {
|
||||
$version = PHP_VERSION;
|
||||
preg_match('/(\d+\.\d+\.\d+)/', PHP_VERSION, $matches);
|
||||
$version = $matches[1];
|
||||
|
||||
return (! Semver::satisfies($version, $constraint))
|
||||
? [$name => compact('version', 'constraint')]
|
||||
|
@ -26,7 +26,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('DB_CONNECTION', 'dummy'),
|
||||
'default' => env('DB_CONNECTION', 'mysql'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -475,9 +475,11 @@ class PluginManagerTest extends TestCase
|
||||
$this->assertEquals(config('app.version'), $info['version']);
|
||||
$this->assertEquals('^0.0.0', $info['constraint']);
|
||||
|
||||
preg_match('/(\d+\.\d+\.\d+)/', PHP_VERSION, $matches);
|
||||
$version = $matches[1];
|
||||
$plugin = new Plugin('', ['require' => ['php' => '^0.0.0']]);
|
||||
$info = $manager->getUnsatisfied($plugin)->get('php');
|
||||
$this->assertEquals(PHP_VERSION, $info['version']);
|
||||
$this->assertEquals($version, $info['version']);
|
||||
$this->assertEquals('^0.0.0', $info['constraint']);
|
||||
|
||||
$plugin = new Plugin('', ['require' => ['another-plugin' => '0.0.*']]);
|
||||
|
@ -800,6 +800,8 @@ class SkinlibControllerTest extends TestCase
|
||||
|
||||
// Without returning score
|
||||
option(['return_score' => false, 'private_score_per_storage' => 0]);
|
||||
$uploader->score += 1000;
|
||||
$uploader->save();
|
||||
$texture = factory(Texture::class)->create(['public' => 'false', 'uploader' => $uploader->uid]);
|
||||
$other = factory(User::class)->create();
|
||||
$other->closet()->attach($texture->tid, ['item_name' => 'a']);
|
||||
|
Loading…
Reference in New Issue
Block a user