-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean tests files for latest dependencies (#59)
* Add github workflow (wip) * Add `composer require nesbot/carbon:^2.68.1 --dev` * wip * Drop PHP 7.3 and laravel below v8 * Manage test files Signed-off-by: Lloric Mayuga Garcia <[email protected]> * Use pestphp Signed-off-by: Lloric Mayuga Garcia <[email protected]> * Allow using pest v1 for a lower laravel version Signed-off-by: Lloric Mayuga Garcia <[email protected]> * wip Signed-off-by: Lloric Mayuga Garcia <[email protected]> * Install laravel/pint, then run it on test folder Signed-off-by: Lloric Mayuga Garcia <[email protected]> * Use laravel/pint:^1.5 Signed-off-by: Lloric Mayuga Garcia <[email protected]> * Convert test to pest Signed-off-by: Lloric Mayuga Garcia <[email protected]> * wip Signed-off-by: Lloric Mayuga Garcia <[email protected]> * Use defineDatabaseMigrations() Signed-off-by: Lloric Mayuga Garcia <[email protected]> * Make database test migration realtime Signed-off-by: Lloric Mayuga Garcia <[email protected]> * Make model dynamic Signed-off-by: Lloric Mayuga Garcia <[email protected]> * ide helper Signed-off-by: Lloric Mayuga Garcia <[email protected]> * ide helper Signed-off-by: Lloric Mayuga Garcia <[email protected]> --------- Signed-off-by: Lloric Mayuga Garcia <[email protected]>
- Loading branch information
Showing
38 changed files
with
888 additions
and
1,007 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
php: [8.0, 8.1, 8.2] | ||
laravel: [^8.83.27, ^9.51.0, ^10.0.0] | ||
stability: [prefer-lowest, prefer-stable] | ||
include: | ||
- laravel: ^10.0.0 | ||
testbench: ^8.0.0 | ||
- laravel: ^9.51.0 | ||
testbench: ^7.22.0 | ||
- laravel: ^8.83.27 | ||
testbench: ^6.25.1 | ||
exclude: | ||
- php: 8.0 | ||
laravel: ^10.0.0 | ||
- php: 8.1 | ||
laravel: ^8.83.27 | ||
|
||
|
||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | ||
coverage: xdebug | ||
|
||
- name: Setup problem matchers | ||
run: | | ||
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | ||
composer require nesbot/carbon:^2.68.1 | ||
- name: List Installed Dependencies | ||
run: composer show -D | ||
|
||
- name: Execute test | ||
run: composer test -- --ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 6 additions & 14 deletions
20
...ons/add_reputation_on_user_table.php.stub → ...ons/add_reputation_on_user_table.php.stub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
backupGlobals="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" | ||
cacheDirectory=".phpunit.cache" | ||
backupStaticProperties="false" | ||
> | ||
<testsuites> | ||
<testsuite name="Package Test Suite"> | ||
<directory suffix=".php">./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<php> | ||
<env name="APP_KEY" value="AckfSECs434SFXIvnK5r28GVIWUAxmbBSjTsmF"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="Feature"> | ||
<directory suffix="Test.php">./tests/Feature</directory> | ||
</testsuite> | ||
</testsuites> | ||
<php> | ||
<env name="APP_KEY" value="AckfSECs434SFXIvnK5r28GVIWUAxmbBSjTsmF"/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"preset": "psr12", | ||
"exclude": [ | ||
"src" | ||
], | ||
"notPath": [ | ||
".phpunit.result.cache" | ||
], | ||
"rules": { | ||
"align_multiline_comment": true, | ||
"array_indentation": true, | ||
"array_syntax": true, | ||
"assign_null_coalescing_to_coalesce_equal": true, | ||
"binary_operator_spaces": true, | ||
"blank_line_before_statement": { | ||
"statements": [ | ||
"break", | ||
"continue", | ||
"declare", | ||
"return", | ||
"throw", | ||
"try" | ||
] | ||
}, | ||
"cast_spaces": true, | ||
"class_attributes_separation": { | ||
"elements": { | ||
"method": "one" | ||
} | ||
}, | ||
"clean_namespace": true, | ||
"combine_consecutive_issets": true, | ||
"combine_consecutive_unsets": true, | ||
"declare_strict_types": true, | ||
"doctrine_annotation_indentation": true, | ||
"doctrine_annotation_spaces": true, | ||
"fully_qualified_strict_types": true, | ||
"function_typehint_space": true, | ||
"global_namespace_import": true, | ||
"heredoc_indentation": true, | ||
"include": true, | ||
"lambda_not_used_import": true, | ||
"linebreak_after_opening_tag": true, | ||
"list_syntax": true, | ||
"magic_constant_casing": true, | ||
"magic_method_casing": true, | ||
"method_argument_space": { | ||
"on_multiline": "ensure_fully_multiline", | ||
"keep_multiple_spaces_after_comma": true | ||
}, | ||
"method_chaining_indentation": true, | ||
"multiline_comment_opening_closing": true, | ||
"multiline_whitespace_before_semicolons": true, | ||
"native_function_casing": true, | ||
"native_function_type_declaration_casing": true, | ||
"no_alias_language_construct_call": true, | ||
"no_alternative_syntax": true, | ||
"no_empty_comment": true, | ||
"no_empty_statement": true, | ||
"no_extra_blank_lines": true, | ||
"no_leading_namespace_whitespace": true, | ||
"no_mixed_echo_print": true, | ||
"no_multiline_whitespace_around_double_arrow": true, | ||
"no_multiple_statements_per_line": true, | ||
"no_singleline_whitespace_before_semicolons": true, | ||
"no_spaces_around_offset": true, | ||
"no_unneeded_import_alias": true, | ||
"no_unused_imports": true, | ||
"no_whitespace_before_comma_in_array": true, | ||
"no_whitespace_in_blank_line": true, | ||
"not_operator_with_space": true, | ||
"not_operator_with_successor_space": true, | ||
"php_unit_fqcn_annotation": true, | ||
"phpdoc_line_span": { | ||
"const": "single", | ||
"method": "single", | ||
"property": "single" | ||
}, | ||
"phpdoc_scalar": true, | ||
"phpdoc_single_line_var_spacing": true, | ||
"phpdoc_var_without_name": true, | ||
"simple_to_complex_string_variable": true, | ||
"simplified_if_return": true, | ||
"single_quote": true, | ||
"standardize_not_equals": true, | ||
"trailing_comma_in_multiline": true, | ||
"trim_array_spaces": true, | ||
"types_spaces": true, | ||
"unary_operator_spaces": true, | ||
"whitespace_after_comma_in_array": true | ||
} | ||
} |
Oops, something went wrong.