Skip to content

Commit

Permalink
Merge pull request #37 from InteractionDesignFoundation/nova-5
Browse files Browse the repository at this point in the history
Support Nova 5
  • Loading branch information
alies-dev authored Dec 15, 2024
2 parents 7aa0ec8 + eaaa631 commit 9a2f484
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 29 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/format_php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
ref: ${{ github.head_ref }}

# mtime needs to be restored for PHP-CS-Fixer cache to work correctly
- name: Restore mtimes
uses: weirdan/git-restore-mtime-action@master
- name: Restore timestamps
uses: chetan/git-restore-mtime-action@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.4
coverage: none
tools: cs2pr
env:
Expand All @@ -43,17 +43,11 @@ jobs:
restore-keys: |
${{ runner.os }}-composer-
- name: Install composer dependencies -- step 1
run: 'composer install --working-dir=tools/php-cs-fixer --no-interaction --no-progress --no-scripts'

- name: Install composer dependencies -- step 2
run: 'composer install --working-dir=tools/phpcs --no-interaction --no-progress --no-scripts'

- name: Retrieve PHP-CS-Fixer’s cache
uses: actions/cache@v4
with:
path: .php-cs-fixer.cache
key: ${{ runner.os }}-php-cs-fixer-${{ hashFiles('.php-cs-fixer.php', '.phpcs/**/**') }}
key: ${{ runner.os }}-php-cs-fixer-${{ hashFiles('.php-cs-fixer.php') }}
restore-keys: |
${{ runner.os }}-php-cs-fixer-
Expand All @@ -73,7 +67,7 @@ jobs:
- name: Fix detected PHP coding style issues (if any)
if: ${{ steps.lint_php.outcome == 'failure' }}
id: fix_php
run: composer php:fix
run: composer cs:check
continue-on-error: true

- name: Commit PHP code-style fixes (if any)
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,10 @@ jobs:
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_4_LICENSE_KEY }}"
composer install -n --prefer-dist
- name: Restore timestamps
uses: chetan/git-restore-mtime-action@v2

- run: composer global require cpx/cpx

- name: Run Psalm
run: ./vendor/bin/psalm --shepherd
run: composer psalm -- --shepherd
10 changes: 5 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
fail-fast: true
matrix:
php: [ 8.3, 8.2 ]
laravel: [ 10.* ]
laravel: [ 11.* ]
dependency-version: [ prefer-stable ]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

Expand Down Expand Up @@ -54,14 +54,14 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Cache yarn dependencies
uses: actions/cache@v4
id: npm-node_modules-cache
with:
path: node_modules
key: npm-${{ hashFiles('package.json') }}-node-20
key: npm-${{ hashFiles('package.json') }}-node-22

- name: Compile assets
run: npm install && npm run prod
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
],
"require": {
"php": "^8.1",
"laravel/nova": "^4.20"
"laravel/nova": "^4.20 || ^5.0"
},
"require-dev": {
"interaction-design-foundation/coding-standard": "^0.3.0",
"orchestra/testbench": "^8.3",
"phpunit/phpunit": "^10.5 || ^11.0",
"vimeo/psalm": "^5.22"
"orchestra/testbench-core": "^8.30 || ^9.7",
"phpunit/phpunit": "^11.0"
},
"repositories": [
{
Expand Down Expand Up @@ -59,7 +58,9 @@
"cs": "@cs:fix",
"cs:check": "phpcs -p -s --colors --report-full --report-summary",
"cs:fix": "phpcbf -p --colors",
"psalm": "vendor/bin/psalm",
"psalm": "cpx psalm",
"sa": "@psalm",
"sa:bl": "cpx psalm --set-baseline=psalm-baseline.xml --long-progress --threads=1",
"test": "phpunit --colors=always"
}
}
8 changes: 1 addition & 7 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.22.2@d768d914152dbbf3486c36398802f74e80cfde48">
<file src="src/HtmlCard.php">
<PropertyNotSetInConstructor>
<code><![CDATA[HtmlCard]]></code>
</PropertyNotSetInConstructor>
</file>
</files>
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0"/>

0 comments on commit 9a2f484

Please # to comment.