mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-22 07:30:25 +00:00
Compare commits
32 commits
9df1486d6d
...
886db3aa45
Author | SHA1 | Date | |
---|---|---|---|
|
886db3aa45 | ||
|
10d26a6b82 | ||
|
a5f0f36f0d | ||
|
e3d95f65eb | ||
|
31c61066a7 | ||
|
856d0a5a93 | ||
|
9d1b7e47d3 | ||
|
95ae3165ec | ||
|
03db590d9f | ||
|
6a7d0f4121 | ||
|
188ac5ea79 | ||
|
eec2ee5060 | ||
|
ef3f5a7ba5 | ||
|
156a873997 | ||
|
d947623a29 | ||
|
c79d870831 | ||
|
62903c56e6 | ||
|
1cbe370fc6 | ||
|
d5c3d4d147 | ||
|
2a878db667 | ||
|
19d24acd5c | ||
|
4b348e4a80 | ||
|
049c3bbf5e | ||
|
af6300420e | ||
|
381f465ea5 | ||
|
cf6de314c4 | ||
|
fb79767c60 | ||
|
2e1289bc0e | ||
|
c811dad08d | ||
|
f5a32935e3 | ||
|
fa87d3c211 | ||
|
8ad6de94ef |
10 changed files with 142 additions and 138 deletions
75
.github/workflows/app-code-coverage.yml
vendored
Normal file
75
.github/workflows/app-code-coverage.yml
vendored
Normal 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)
|
46
.github/workflows/code-coverage.yml
vendored
46
.github/workflows/code-coverage.yml
vendored
|
@ -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)
|
13
README.md
13
README.md
|
@ -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:
|
||||
|
|
|
@ -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).
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
45
web/phpunit-coverage.xml
Normal 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>
|
3
web/tests/xdebug-php-ini.txt
Normal file
3
web/tests/xdebug-php-ini.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
[xdebug]
|
||||
zend_extension=/usr/local/phyre/php/zend-xdebug/xdebug.so
|
||||
xdebug.mode=coverage
|
Loading…
Reference in a new issue