Compare commits

...

32 commits

Author SHA1 Message Date
Bozhidar
886db3aa45 update 2024-04-29 01:10:38 +03:00
Bozhidar
10d26a6b82 update 2024-04-29 00:56:45 +03:00
Bozhidar
a5f0f36f0d Update xdebug-php-ini.txt 2024-04-29 00:46:04 +03:00
Bozhidar
e3d95f65eb Update xdebug-php-ini.txt 2024-04-29 00:45:41 +03:00
Bozhidar
31c61066a7 update 2024-04-29 00:42:55 +03:00
Bozhidar
856d0a5a93 update 2024-04-29 00:33:14 +03:00
Bozhidar
9d1b7e47d3 Update app-code-coverage.yml 2024-04-29 00:29:14 +03:00
Bozhidar
95ae3165ec Update app-code-coverage.yml 2024-04-29 00:27:41 +03:00
Bozhidar
03db590d9f Update app-code-coverage.yml 2024-04-29 00:23:47 +03:00
Bozhidar
6a7d0f4121 update 2024-04-29 00:20:09 +03:00
Bozhidar
188ac5ea79 update 2024-04-29 00:17:33 +03:00
Bozhidar
eec2ee5060 Update app-code-coverage.yml 2024-04-29 00:12:47 +03:00
Bozhidar
ef3f5a7ba5 Update app-code-coverage.yml 2024-04-29 00:10:49 +03:00
Bozhidar
156a873997 Update app-code-coverage.yml 2024-04-29 00:06:58 +03:00
Bozhidar
d947623a29 Update app-code-coverage.yml 2024-04-29 00:04:20 +03:00
Bozhidar
c79d870831 Update app-code-coverage.yml 2024-04-29 00:02:20 +03:00
Bozhidar
62903c56e6 Update app-code-coverage.yml 2024-04-28 23:59:31 +03:00
Bozhidar
1cbe370fc6 Update app-code-coverage.yml 2024-04-28 23:53:43 +03:00
Bozhidar
d5c3d4d147 Update app-code-coverage.yml 2024-04-28 23:51:28 +03:00
Bozhidar
2a878db667 Update app-code-coverage.yml 2024-04-28 23:44:33 +03:00
Bozhidar
19d24acd5c Update app-code-coverage.yml 2024-04-28 23:36:17 +03:00
Bozhidar
4b348e4a80 Update README.md 2024-04-28 23:14:11 +03:00
Bozhidar
049c3bbf5e update 2024-04-28 22:52:10 +03:00
Bozhidar
af6300420e update 2024-04-28 22:49:27 +03:00
Bozhidar
381f465ea5 Update composer.json 2024-04-28 22:46:48 +03:00
Bozhidar
cf6de314c4 Update app-code-coverage.yml 2024-04-28 22:44:07 +03:00
Bozhidar
fb79767c60 Update app-code-coverage.yml 2024-04-28 22:42:03 +03:00
Bozhidar
2e1289bc0e update 2024-04-28 22:38:10 +03:00
Bozhidar
c811dad08d Update code-coverage.yml 2024-04-28 22:33:29 +03:00
Bozhidar
f5a32935e3 Update code-coverage.yml 2024-04-28 22:32:26 +03:00
Bozhidar
fa87d3c211 update 2024-04-28 22:31:41 +03:00
Bozhidar
8ad6de94ef update 2024-04-28 22:25:00 +03:00
10 changed files with 142 additions and 138 deletions

75
.github/workflows/app-code-coverage.yml vendored Normal file
View file

@ -0,0 +1,75 @@
name: Phyre Panel - Code Coverage
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
phyre-panel-code-coverage:
strategy:
matrix:
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
ref: ${{ github.sha }}
- name: Install Base
run: |
ls -la
sudo mkdir /phyre-panel
sudo cp installers/${{ matrix.os }}/install-partial/install_base.sh /phyre-panel/install_base.sh
sudo chmod +x /phyre-panel/install_base.sh
sudo /phyre-panel/install_base.sh
sudo cp installers/${{ matrix.os }}/install-partial/install_web.sh /phyre-panel/install_web.sh
sudo chmod +x /phyre-panel/install_web.sh
- name: Run Code Coverage
run: |
sudo cp -r web /usr/local/phyre/web/
cd /usr/local/phyre/web/
ls -la
sudo wget https://getcomposer.org/download/latest-stable/composer.phar
sudo COMPOSER_ALLOW_SUPERUSER=1 phyre-php composer.phar install
sudo /phyre-panel/install_web.sh
sudo mkdir -p /usr/local/phyre/php-xdebug
cd /usr/local/phyre/php-xdebug
sudo wget http://xdebug.org/files/xdebug-3.3.2.tgz
sudo tar -xvzf xdebug-3.3.2.tgz
cd xdebug-3.3.2
sudo /usr/local/phyre/php/bin/phpize
sudo ./configure --enable-xdebug --with-php-config=/usr/local/phyre/php/bin/php-config
sudo make
sudo mkdir -p /usr/local/phyre/php/zend-xdebug
sudo cp modules/xdebug.so /usr/local/phyre/php/zend-xdebug/xdebug.so
sudo chmod 777 /usr/local/phyre/php/zend-xdebug/xdebug.so
sudo cp /usr/local/phyre/web/tests/xdebug-php-ini.txt /usr/local/phyre/php/bin/php.ini
sudo chmod 777 /usr/local/phyre/php/bin/php.ini
phyre-php -v
cd /usr/local/phyre/web/
sudo chmod -R 777 vendor
composer test:coverage
- name: Code Cov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: /usr/local/phyre/web/clover.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

View file

@ -1,46 +0,0 @@
name: Phyre Panel - Code Coverage
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-coverage-phyre-web-panel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
- name: Npm install
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: mbstring, dom, fileinfo, mysql, gd, curl, zip, sqlite, xml,
coverage: xdebug
- name: Install Composer Dependencies
working-directory: ./web
run: |
composer install
composer dump-autoload
- name: Install NODE Dependencies
working-directory: ./web
run: |
npm install
npm run build
- name: Run Code Coverage
run: composer test:coverage
- name: Code Cov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: clover.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

View file

@ -12,6 +12,19 @@ wget https://raw.githubusercontent.com/PhyreApps/PhyrePanel/main/installers/inst
```
The admin panel can be opened on port: yourserver.com:8443
## Build Status
### Master branch
![Unit Tests](https://github.com/PhyreApps/PhyrePanel/actions/workflows/app-unit-test.yml/badge.svg)
[![codecov](https://codecov.io/gh/PhyreApps/PhyrePanel/graph/badge.svg?token=BO0RTPLS4W)](https://codecov.io/gh/PhyreApps/PhyrePanel)
All development is done on the `dev` branch. The `master` branch is used for stable releases.
Please note that the `dev` branch is not guaranteed to be stable at all times, and may contain bugs or other issues. Use it at your own risk.
Please submit all pull requests to the `dev` branch.
## Server Application Types Supported
PHYRE PANEL supports a variety of server application types, including:

View file

@ -1,66 +0,0 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
<p align="center">
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
## About Laravel
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Laravel is accessible, powerful, and provides tools required for large, robust applications.
## Learning Laravel
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
## Laravel Sponsors
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
### Premium Partners
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[WebReinvent](https://webreinvent.com/)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[64 Robots](https://64robots.com)**
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
- **[Jump24](https://jump24.co.uk)**
- **[Redberry](https://redberry.international/laravel/)**
- **[Active Logic](https://activelogic.com)**
- **[byte5](https://byte5.de)**
- **[OP.GG](https://op.gg)**
## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
## Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
## Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

View file

@ -1,24 +0,0 @@
<?php
namespace App\Http\Controllers\Api\Request;
class AuthorizedApiRequest extends ApiRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
$user = auth()->user();
if ($user) {
return true;
}
return false;
}
}

View file

@ -2,7 +2,7 @@
namespace App\Http\Controllers\Api\Request;
class CustomerCreateRequest extends AuthorizedApiRequest
class CustomerCreateRequest extends ApiRequest
{
/**
* Get the validation rules that apply to the request.

View file

@ -2,7 +2,7 @@
namespace App\Http\Controllers\Api\Request;
class HostingSubscriptionCreateRequest extends AuthorizedApiRequest
class HostingSubscriptionCreateRequest extends ApiRequest
{
/**
* Get the validation rules that apply to the request.

View file

@ -70,6 +70,10 @@
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"test:coverage": [
"Composer\\Config::disableProcessTimeout",
"sudo phyre-php artisan test --coverage -c \"phpunit-coverage.xml\""
]
},
"extra": {

45
web/phpunit-coverage.xml Normal file
View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<logging>
<testdoxText outputFile="php://stdout"/>
<junit outputFile="coverage.xml"/>
</logging>
<coverage includeUncoveredFiles="true"
pathCoverage="false"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="true">
<report>
<clover outputFile="clover.xml"/>
</report>
</coverage>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>app</directory>
<directory>Modules</directory>
</include>
</source>
<php>
<env name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="SESSION_DRIVER" value="array"/>
<ini name="memory_limit" value="-1"/>
<env name="MAIL_DRIVER" value="array"/>
<env name="MAIL_MAILER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="TELESCOPE_ENABLED" value="false"/>
</php>
</phpunit>

View file

@ -0,0 +1,3 @@
[xdebug]
zend_extension=/usr/local/phyre/php/zend-xdebug/xdebug.so
xdebug.mode=coverage