Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
datashaman committed Mar 4, 2024
1 parent 1f9ba3e commit e9c5be1
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 20 deletions.
12 changes: 8 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

# EditorConfig is awesome: http://EditorConfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[{Makefile,*.mak}]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

[{Makefile,*.mak,*.sh,*.yml}]
indent_size = 2
1 change: 1 addition & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
layout php
12 changes: 2 additions & 10 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/.scrutinizer.yml export-ignore
/tests export-ignore
* text=auto eol=lf whitespace=tab-in-indent,blank-at-eol,tabwidth=4
makefile text whitespace=-tab-in-indent,blank-at-eol,tabwidth=4
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build

on:
pull_request:

jobs:
test:
strategy:
matrix:
illuminate-version:
- 9
- 10
php-version:
- 8.0
- 8.1
- 8.2
exclude:
- illuminate-version: 10
php-version: 8.0

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2

- name: Install dependencies
run: |
composer require \
--no-ansi \
--no-interaction \
--no-progress \
--no-scripts \
--prefer-dist \
illuminate/support:^${{ matrix.illuminate-version }}
- name: Lint Code
run: vendor/bin/tlint

- name: Laravel 10 Changes
if: matrix.illuminate-version == 10
run: |
composer config minimum-stability stable --file composer.json
vendor/bin/phpunit --migrate-configuration
- name: Run tests
run: vendor/bin/phpunit
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/.envrc
/.idea/
/.phpunit.result.cache
/composer.lock
/vendor
build
composer.lock
composer.phar
.idea/
.phpunit.result.cache
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"ext-pcntl": "*",
"ext-sockets": "*",
"mockery/mockery": "^1",
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.5",
"tightenco/tlint": "^9.2"
},
"extra": {
"include_files": [
Expand Down
10 changes: 10 additions & 0 deletions tlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"preset": "laravel",
"disabled": [
"SpaceAfterSoleNotOperator",
"NoParensEmptyInstantiations",
"OneLineBetweenClassVisibilityChanges",
"ModelMethodOrder",
"ConcatenationNoSpacing"
]
}

0 comments on commit e9c5be1

Please sign in to comment.