-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
3,201 additions
and
549 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,16 @@ | ||
name: Matrix | ||
|
||
on: | ||
push | ||
|
||
jobs: | ||
master-matrix: | ||
strategy: | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest'] | ||
php: ['8.3'] | ||
uses: ./.github/workflows/test.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
php: ${{ matrix.php }} | ||
secrets: inherit |
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,266 @@ | ||
name: Testing | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
php: | ||
required: true | ||
type: string | ||
|
||
env: | ||
node-modules-cache-name: cache-node-modules | ||
composer-packages-cache-name: cache-composer-packages | ||
build-artifacts: build-artifacts | ||
|
||
jobs: | ||
debug: | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: Setup PHP ${{ inputs.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ inputs.php }} | ||
- run: php --version | ||
- run: node --version | ||
- run: npm --version | ||
build: | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup PHP ${{ inputs.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ inputs.php }} | ||
- name: Setup Environment | ||
run: cp .env.ci .env | ||
- name: Cache node modules | ||
id: cache-node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./node_modules | ||
key: ${{ runner.os }}-build-${{ env.node-modules-cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install node dependencise | ||
run: npm install | ||
- name: Cache composer packages | ||
id: cache-composer-packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./vendor | ||
key: ${{ runner.os }}-build-${{ env.composer-packages-cache-name }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Install composer dependencies | ||
run: composer install -n --ignore-platform-reqs --no-progress --no-suggest | ||
- name: Build artifacts | ||
run: npm run prod | ||
- name: Tar artifacts | ||
run: /bin/tar -cz -f ~/${{ env.build-artifacts }}.tgz -C ./public css fonts js mix-manifest.json | ||
- name: Store build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.build-artifacts }} | ||
path: ~/${{ env.build-artifacts }}.tgz | ||
unit-tests: | ||
env: | ||
job-name: unit-tests | ||
runs-on: ${{ inputs.os }} | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup PHP ${{ inputs.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ inputs.php }} | ||
- name: Setup Environment | ||
run: | | ||
cp .env.ci .env | ||
touch ./storage/logs/laravel.log | ||
touch ./database/database.sqlite | ||
- name: Restore node modules cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./node_modules | ||
key: ${{ runner.os }}-build-${{ env.node-modules-cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
- name: Restore composer packages cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./vendor | ||
key: ${{ runner.os }}-build-${{ env.composer-packages-cache-name }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Migrate Database | ||
run: php artisan migrate --force | ||
- name: Setup Laravel Passport | ||
run: php artisan passport:install | ||
- name: Directory Permissions | ||
run: chmod -R 777 storage bootstrap/cache | ||
- name: Dump Autoloader | ||
run: composer dump-autoload | ||
- name: Execute Unit tests via PHPUnit | ||
run: vendor/bin/phpunit tests/Unit | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: ${{ env.job-name }}-log | ||
path: ./storage/logs/*.log | ||
integration-tests: | ||
env: | ||
job-name: integration-tests | ||
runs-on: ${{ inputs.os }} | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup PHP ${{ inputs.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ inputs.php }} | ||
- name: Setup Environment | ||
run: | | ||
cp .env.ci .env | ||
touch ./storage/logs/laravel.log | ||
touch ./database/database.sqlite | ||
- name: Restore node modules cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./node_modules | ||
key: ${{ runner.os }}-build-${{ env.node-modules-cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
- name: Restore composer packages cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./vendor | ||
key: ${{ runner.os }}-build-${{ env.composer-packages-cache-name }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Migrate Database | ||
run: php artisan migrate --force | ||
- name: Setup Laravel Passport | ||
run: php artisan passport:install | ||
- name: Directory Permissions | ||
run: chmod -R 777 storage bootstrap/cache | ||
- name: Dump Autoloader | ||
run: composer dump-autoload | ||
- name: Run Laravel Server | ||
run: php artisan serve & | ||
- name: Execute Integration tests via PHPUnit | ||
run: vendor/bin/phpunit tests/Integration | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: ${{ env.job-name }}-log | ||
path: ./storage/logs/*.log | ||
feature-tests: | ||
env: | ||
job-name: feature-tests | ||
runs-on: ${{ inputs.os }} | ||
needs: [build] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup PHP ${{ inputs.php }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ inputs.php }} | ||
- name: Setup Environment | ||
run: | | ||
cp .env.ci .env | ||
touch ./storage/logs/laravel.log | ||
touch ./database/database.sqlite | ||
- name: Restore node modules cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./node_modules | ||
key: ${{ runner.os }}-build-${{ env.node-modules-cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
- name: Restore composer packages cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./vendor | ||
key: ${{ runner.os }}-build-${{ env.composer-packages-cache-name }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Restore building artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ env.build-artifacts }} | ||
- run: tar -xz -f ./${{ env.build-artifacts }}.tgz -C ./public | ||
- name: Migrate Database | ||
run: php artisan migrate --force | ||
- name: Setup Laravel Passport | ||
run: php artisan passport:install | ||
- name: Directory Permissions | ||
run: chmod -R 777 storage bootstrap/cache | ||
- name: Dump Autoloader | ||
run: composer dump-autoload | ||
- name: Run Laravel Server | ||
run: php artisan serve & | ||
- name: Execute Feature tests via PHPUnit | ||
run: vendor/bin/phpunit tests/Feature | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: ${{ env.job-name }}-log | ||
path: ./storage/logs/*.log | ||
# dusk-tests: | ||
# env: | ||
# job-name: dusk-tests | ||
# runs-on: ${{ inputs.os }} | ||
# needs: [build] | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Setup PHP ${{ inputs.php }} | ||
# uses: shivammathur/setup-php@v2 | ||
# with: | ||
# php-version: ${{ inputs.php }} | ||
# - name: Setup Environment | ||
# run: | | ||
# cp .env.ci .env | ||
# touch ./storage/logs/laravel.log | ||
# touch ./database/database.sqlite | ||
# - name: Restore node modules cache | ||
# uses: actions/cache@v4 | ||
# with: | ||
# path: ./node_modules | ||
# key: ${{ runner.os }}-build-${{ env.node-modules-cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
# - name: Restore composer packages cache | ||
# uses: actions/cache@v4 | ||
# with: | ||
# path: ./vendor | ||
# key: ${{ runner.os }}-build-${{ env.composer-packages-cache-name }}-${{ hashFiles('**/composer.lock') }} | ||
# - name: Restore building artifacts | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: ${{ env.build-artifacts }} | ||
# - run: tar -xz -f ./${{ env.build-artifacts }}.tgz -C ./public | ||
# - name: Migrate Database | ||
# run: php artisan migrate --force | ||
# - name: Setup Laravel Passport | ||
# run: php artisan passport:install | ||
# - name: Directory Permissions | ||
# run: chmod -R 777 storage bootstrap/cache | ||
# - name: Dump Autoloader | ||
# run: composer dump-autoload | ||
# - name: Update Chrome Driver | ||
# run: | | ||
# CHROME_VERSION="$(google-chrome --version)" | ||
# CHROMEDRIVER_RELEASE="$(echo $CHROME_VERSION | sed 's/^Google Chrome //')" | ||
# CHROMEDRIVER_RELEASE=${CHROMEDRIVER_RELEASE%%.*} | ||
# php artisan dusk:chrome-driver $CHROMEDRIVER_RELEASE | ||
# - name: Start Chrome Driver | ||
# run: ./vendor/laravel/dusk/bin/chromedriver-linux & | ||
# - name: Run Laravel Server | ||
# run: php artisan serve & | ||
# - name: Run Laravel Dusk Tests | ||
# id: laravel-dusk | ||
# continue-on-error: true | ||
# run: php artisan dusk | ||
# - name: Upload logs | ||
# uses: actions/upload-artifact@v4 | ||
# if: ${{ steps.laravel-dusk.outcome == 'failure'}} | ||
# with: | ||
# name: ${{ env.job-name }}-log | ||
# path: ./storage/logs/*.log | ||
# - name: Upload screenshots | ||
# uses: actions/upload-artifact@v4 | ||
# if: ${{ steps.laravel-dusk.outcome == 'failure' }} | ||
# with: | ||
# name: ${{ env.job-name }}-screenshots | ||
# path: ./tests/Browser/screenshots | ||
# - name: Sanity check | ||
# if: ${{ steps.laravel-dusk.outcome == 'failure'}} | ||
# run: exit 2 |
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,15 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Club; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class ClubCreated | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
public function __construct(public Club $club) {} | ||
} |
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,15 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Competition; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class CompetitionCreated | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
public function __construct(public Competition $competition) {} | ||
} |
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,15 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Division; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class DivisionCreated | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
public function __construct(public Division $division) {} | ||
} |
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,15 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Season; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class SeasonCreated | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
public function __construct(public Season $season) {} | ||
} |
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,15 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Team; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class TeamCreated | ||
{ | ||
use Dispatchable, InteractsWithSockets, SerializesModels; | ||
|
||
public function __construct(public Team $team) {} | ||
} |
Oops, something went wrong.