Skip to content

Commit

Permalink
Merged with parent fork
Browse files Browse the repository at this point in the history
  • Loading branch information
syntaxlexx committed Jul 20, 2021
2 parents ecb2a91 + d972279 commit 0e54aaf
Show file tree
Hide file tree
Showing 516 changed files with 49,894 additions and 29,636 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ indent_size = 2
indent_size = 2

[*.js]
indent_size = 2
indent_size = 2

[*.json]
indent_size = 2
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ PUSHER_SECRET=

SANCTUM_STATEFUL_DOMAINS=crater.test
SESSION_DOMAIN=crater.test

TRUSTED_PROXIES="*"
37 changes: 37 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on: [push, pull_request]

jobs:
build-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0']

name: PHP ${{ matrix.php }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: exif

- name: Install PHP 7 dependencies
run: composer update --no-interaction --no-progress
if: "matrix.php < 8"

- name: Install PHP 8 dependencies
run: composer update --ignore-platform-req=php --no-interaction --no-progress
if: "matrix.php >= 8"

- name: Check coding style
run: ./vendor/bin/php-cs-fixer fix -v --dry-run --using-cache=no --config=.php-cs-fixer.dist.php

- name: Unit Tests
run: php ./vendor/bin/pest
42 changes: 42 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude(['bootstrap', 'storage', 'vendor'])
->name('*.php')
->name('_ide_helper')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

$rules = [
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'concat_space' => true,
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
'property' => 'one',
],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
];

return (new PhpCsFixer\Config())
->setUsingCache(true)
->setRules($rules)
->setFinder($finder);
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ RUN apt-get update && apt-get install -y \
libonig-dev \
libxml2-dev \
zip \
unzip \
libzip-dev \
libmagickwand-dev
unzip \
libzip-dev \
libmagickwand-dev \
mariadb-client

# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

RUN pecl install imagick \
RUN pecl install imagick \
&& docker-php-ext-enable imagick

# Install PHP extensions
RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl bcmath gd
RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl bcmath gd

# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
Expand Down
Loading

0 comments on commit 0e54aaf

Please sign in to comment.