-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feature/h5p-spaces
- Loading branch information
Showing
31 changed files
with
873 additions
and
268 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Tests PHPStan in environments | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
php82-laravel-latest-phpstan-postgres: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: escolalms/php:8.2 | ||
|
||
services: | ||
postgres: | ||
image: postgres:12 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: test | ||
TZ: Europe/Warsaw | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- name: Instantiate package | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update composer | ||
run: COMPOSER_ROOT_VERSION=0.9.9 composer update | ||
|
||
- name: Setup environment | ||
run: cp env/postgres/* . | ||
|
||
- name: Clear config | ||
run: vendor/bin/testbench config:clear | ||
|
||
- name: Publish things | ||
run: vendor/bin/testbench migrate:fresh | ||
|
||
- name: Run tests | ||
run: vendor/bin/phpstan analyse |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
includes: | ||
- ./vendor/nunomaduro/larastan/extension.neon | ||
|
||
parameters: | ||
|
||
paths: | ||
- src/ | ||
|
||
# The level 9 is the highest level | ||
level: 3 |
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,41 @@ | ||
<?php | ||
|
||
namespace EscolaLms\HeadlessH5P\Commands; | ||
|
||
use EscolaLms\HeadlessH5P\Helpers\Helpers; | ||
use EscolaLms\HeadlessH5P\Repositories\H5PFileStorageRepository; | ||
use Illuminate\Console\Command; | ||
use Illuminate\Support\Facades\Storage; | ||
|
||
class StorageH5PCopyStorageCommand extends Command | ||
{ | ||
/** | ||
* The console command signature. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'h5p:storage-copy'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Copy local H5P storage to s3 and after delete files from local storage'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return void | ||
*/ | ||
public function handle() | ||
{ | ||
$link = Storage::path('h5p'); | ||
$target = storage_path('app/h5p'); | ||
|
||
app(H5PFileStorageRepository::class, ['path' => env('AWS_URL')])->copyVendorFiles($target, $link); | ||
Helpers::deleteFileTreeLocal($target); | ||
|
||
$this->info("The files [$target] have been copied to [$link]."); | ||
} | ||
} |
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
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.