Merge branch 'develop' into attributes

This commit is contained in:
Matthew Penner 2022-10-29 18:00:59 -06:00 committed by GitHub
commit 5535bae771
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 142 additions and 27 deletions

View file

@ -1,15 +1,17 @@
root = true root = true
[*] [*]
end_of_line = lf
insert_final_newline = true
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
tab_width = 4
end_of_line = lf
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true
[*.yml]
indent_size = 2
[*.md] [*.md]
trim_trailing_whitespace = false trim_trailing_whitespace = false
[*.{md,nix,yml,yaml}]
indent_size = 2
tab_width = 2

View file

@ -3,16 +3,19 @@ name: Build
on: on:
push: push:
branches: branches:
- 'develop' - "develop"
- 'v2' - "1.0-develop"
pull_request: pull_request:
branches:
- "develop"
- "1.0-develop"
jobs: jobs:
ui: ui:
name: UI name: UI
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
strategy: strategy:
fail-fast: false
matrix: matrix:
node-version: [16] node-version: [16]
steps: steps:
@ -23,7 +26,7 @@ jobs:
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'yarn' cache: "yarn"
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile run: yarn install --frozen-lockfile

View file

@ -3,20 +3,22 @@ name: Tests
on: on:
push: push:
branches: branches:
- 'develop' - "develop"
- 'v2' - "1.0-develop"
pull_request: pull_request:
branches:
- "develop"
- "1.0-develop"
jobs: jobs:
tests: tests:
name: Tests name: Tests
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php: [8.0, 8.1] php: [8.0, 8.1]
database: ['mariadb:10.2', 'mysql:8'] database: ["mariadb:10.2", "mysql:8"]
services: services:
database: database:
image: ${{ matrix.database }} image: ${{ matrix.database }}
@ -33,15 +35,15 @@ jobs:
- name: Get cache directory - name: Get cache directory
id: composer-cache id: composer-cache
run: | run: |
echo "::set-output name=dir::$(composer config cache-files-dir)" echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache - name: Cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: | path: ${{ steps.composer-cache.outputs.dir }}
~/.php_cs.cache key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
${{ steps.composer-cache.outputs.dir }} restore-keys: |
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }} ${{ runner.os }}-composer-${{ matrix.php }}-
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
@ -57,10 +59,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist run: composer install --no-interaction --no-progress --no-suggest --prefer-dist
- name: PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff
continue-on-error: true
- name: Unit tests - name: Unit tests
run: vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Unit run: vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Unit
if: ${{ always() }} if: ${{ always() }}

View file

@ -3,8 +3,8 @@ name: Publish Docker Image
on: on:
push: push:
branches: branches:
- 'develop' - "develop"
- 'release/v*' - "release/v*"
jobs: jobs:
push: push:

29
.github/workflows/lint.yaml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Lint
on:
push:
branches:
- "develop"
- "1.0-develop"
pull_request:
branches:
- "develop"
- "1.0-develop"
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- name: Code Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer:v2
coverage: none
- name: PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff

View file

@ -3,7 +3,7 @@ name: Release
on: on:
push: push:
tags: tags:
- 'v*' - "v*"
jobs: jobs:
release: release:
@ -17,7 +17,7 @@ jobs:
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 16 node-version: 16
cache: 'yarn' cache: "yarn"
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile run: yarn install --frozen-lockfile

1
.gitignore vendored
View file

@ -8,6 +8,7 @@
storage/framework/* storage/framework/*
/.idea /.idea
/nbproject /nbproject
/.direnv
node_modules node_modules
*.log *.log

View file

@ -104,7 +104,7 @@ class BackupManager
*/ */
public function createWingsAdapter(array $config): FilesystemAdapter public function createWingsAdapter(array $config): FilesystemAdapter
{ {
return new InMemoryFilesystemAdapter(null); return new InMemoryFilesystemAdapter();
} }
/** /**

43
flake.lock Normal file
View file

@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1666539104,
"narHash": "sha256-jeuC+d375wHHxMOFLgu7etseCQVJuPNKoEc9X9CsErg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0e6df35f39651504249a05191f9a78d251707e22",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

22
flake.nix Normal file
View file

@ -0,0 +1,22 @@
{
description = "Pterodactyl Panel";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {inherit system;};
in {
devShell = import ./shell.nix {inherit pkgs;};
}
);
}

17
shell.nix Normal file
View file

@ -0,0 +1,17 @@
{pkgs ? import <nixpkgs> {}}:
with pkgs;
mkShell rec {
buildInputs = [
alejandra
(php81.buildEnv {
extensions = ({ enabled, all }: enabled ++ (with all; [
redis
xdebug
]));
extraConfig = ''
xdebug.mode=debug
'';
})
php81Packages.composer
];
}