This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into #89-unit-tests
- Loading branch information
Showing
70 changed files
with
1,051 additions
and
23,699 deletions.
There are no files selected for viewing
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,21 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
extends: [ | ||
'standard', | ||
'eslint:recommended' | ||
], | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: 'module' | ||
}, | ||
rules: { | ||
semi: [2, 'never'], | ||
quotes: ['error', 'single'], | ||
indent: ['error', 2], | ||
'comma-dangle': ['error', 'always-multiline'], | ||
'object-curly-spacing': ['error', 'always'], | ||
} | ||
} |
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 @@ | ||
name: Lint JS stuff | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
test-and-lint-js: | ||
name: Lint JS stuff | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package.lock') }} | ||
restore-keys: ${{ runner.os }}-npm-dependencies | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Instal npm dependencies | ||
run: npm install | ||
|
||
- name: Run JS linter | ||
run: npm run eslint |
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 |
---|---|---|
|
@@ -22,3 +22,5 @@ storage/redis/dump.rdb | |
.editorconfig | ||
/storage/src/* | ||
composer.lock | ||
package-lock.json | ||
yarn.lock |
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
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
26 changes: 26 additions & 0 deletions
26
database/migrations/2022_03_18_195003_create_news_table.php
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,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class() extends Migration { | ||
public function up(): void | ||
{ | ||
Schema::create("news", function (Blueprint $table): void { | ||
$table->id(); | ||
$table->foreignId("author_id")->constrained()->onDelete("cascade"); | ||
$table->string("title"); | ||
$table->longText("text"); | ||
$table->string("slug")->unique(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists("news"); | ||
} | ||
}; |
23 changes: 23 additions & 0 deletions
23
database/migrations/2022_04_22_103521_create_meetup_speaker_table.php
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,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class() extends Migration { | ||
public function up(): void | ||
{ | ||
Schema::create("meetup_speaker", function (Blueprint $table): void { | ||
$table->id(); | ||
$table->foreignId("meetup_id")->constrained()->onDelete("cascade"); | ||
$table->foreignId("speaker_id")->constrained()->onDelete("cascade"); | ||
}); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::dropIfExists("meetup_speaker"); | ||
} | ||
}; |
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 |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
use Blumilk\Meetup\Core\Models\User; | ||
use Illuminate\Database\Seeder; | ||
use Illuminate\Support\Carbon; | ||
use Illuminate\Support\Facades\Hash; | ||
|
||
class DummyDataSeeder extends Seeder | ||
{ | ||
|
@@ -20,7 +19,7 @@ public function run(): void | |
$user = User::factory([ | ||
"name" => "Admin", | ||
"email" => "[email protected]", | ||
"password" => Hash::make("password"), | ||
"password" => "password", | ||
"email_verified_at" => Carbon::createFromDate(2022, 01, 01), | ||
])->create(); | ||
|
||
|
@@ -30,9 +29,9 @@ public function run(): void | |
foreach ($speakers as $speaker) { | ||
Meetup::factory()->create([ | ||
"user_id" => $user, | ||
"speaker_id" => $speakers->random(), | ||
"organization_id" => $organizations->random(), | ||
]); | ||
])->speakers()->attach($speakers->random()); | ||
|
||
OrganizationProfile::factory()->create([ | ||
"organization_id" => $organizations->random(), | ||
]); | ||
|
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.