Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #89 from creasico/feat/laravel-11
Browse files Browse the repository at this point in the history
feat: init support for laravel 11
  • Loading branch information
feryardiant authored Mar 27, 2024
2 parents 6ccd90f + 46bbb5e commit 544f6db
Show file tree
Hide file tree
Showing 145 changed files with 2,802 additions and 2,450 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trim_trailing_whitespace = true
insert_final_newline = false
trim_trailing_whitespace = false

[*.{css,js,ts,svg,xml,yml,yaml}]
[*.{css,js,ts,svg,xml,neon,yml,yaml}]
indent_size = 2

[resources/**.conf]
Expand Down
7 changes: 0 additions & 7 deletions .env.example

This file was deleted.

20 changes: 13 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
pull-requests: write

tests:
name: Test on PHP ${{ matrix.php }} with DB ${{ matrix.db }}
name: Test on PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }} DB ${{ matrix.db }}
runs-on: ubuntu-latest
needs: configs
outputs:
Expand Down Expand Up @@ -69,8 +69,12 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2]
db: ['mysql', 'pgsql']
laravel: ['10.x', '11.x']
php: [8.1, 8.2, 8.3]
exclude:
- php: 8.1
laravel: '11.x'

steps:
- name: Checkout
Expand All @@ -90,18 +94,20 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ needs.configs.outputs.composer-cache }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
key: ${{ matrix.php }}-${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ matrix.php }}-${{ matrix.laravel }}-composer-

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress
run: |
composer require "laravel/framework=${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Run tests
run: composer test -- --coverage

- name: Generate reports for CodeClimate
id: reports
if: ${{ github.actor != 'dependabot[bot]' || needs.configs.outputs.should-reports == '1' }}
if: ${{ matrix.laravel == '10.x' && ( github.actor != 'dependabot[bot]' || needs.configs.outputs.should-reports == '1' ) }}
env:
COVERAGE_FILE: tests/reports/clover.xml
CODECLIMATE_REPORT: tests/reports/codeclimate.${{ matrix.php }}.json
Expand All @@ -114,7 +120,7 @@ jobs:
- name: Upload tests reports
uses: actions/upload-artifact@v4
if: ${{ github.actor != 'dependabot[bot]' || needs.configs.outputs.should-reports == '1' }}
if: ${{ matrix.laravel == '10.x' && ( github.actor != 'dependabot[bot]' || needs.configs.outputs.should-reports == '1' ) }}
with:
name: test-reports-${{ matrix.php }}-${{ matrix.db }}
path: tests/reports
Expand Down
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
"@build",
"@php vendor/bin/testbench serve"
],
"tinker": [
"Composer\\Config::disableProcessTimeout",
"@php vendor/bin/testbench tinker"
],
"lint": [
"@php vendor/bin/pint",
"@php vendor/bin/phpstan analyse"
Expand All @@ -71,14 +75,14 @@
"require": {
"php": "^8.1",
"creasi/laravel-nusa": "^0.1.1",
"laravel/framework": "^9.0|^10.0"
"laravel/framework": "^9.0|^10.0|^11.0"
},
"require-dev": {
"composer-runtime-api": "*",
"laravel/pint": "^1.1",
"laravel/sanctum": "^3.2",
"nunomaduro/collision": "^7.4",
"orchestra/testbench": "^8.5"
"laravel/sanctum": "^3.2|^4.0",
"nunomaduro/collision": "^7.4|^8.0",
"orchestra/testbench": "^8.5|^9.0"
},
"config": {
"preferred-install": "dist",
Expand Down
Loading

0 comments on commit 544f6db

Please sign in to comment.