From a36b858d6b48b6f01ab5580d691cf0695d037b83 Mon Sep 17 00:00:00 2001 From: Harmen Janssen Date: Mon, 2 Dec 2024 13:06:20 +0100 Subject: [PATCH] Update versions in docs and workflows --- .github/workflows/code-style.yaml | 12 +++++----- .github/workflows/run-tests.yaml | 38 +++++++++++++++++++++++-------- README.md | 17 ++++++++++++-- composer.json | 2 +- package.json | 3 +++ 5 files changed, 54 insertions(+), 18 deletions(-) diff --git a/.github/workflows/code-style.yaml b/.github/workflows/code-style.yaml index 17659dd..410538f 100644 --- a/.github/workflows/code-style.yaml +++ b/.github/workflows/code-style.yaml @@ -6,15 +6,15 @@ on: jobs: prettier: name: Code style - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: "12.x" - cache: "npm" + node-version: "22.x" + cache: "yarn" - - run: npm install + - run: yarn install - run: npx prettier --check . diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index b014ff6..ebf0dc5 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -2,25 +2,45 @@ name: Run tests on: push: - pull_request: jobs: php-tests: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.0] - laravel: [8.*] + laravel: [8.*, 9.*, 10.*, 11.*] + php: [8.0, 8.1, 8.2, 8.3] dependency-version: [prefer-stable] include: - laravel: 8.* testbench: 6.* - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} + phpunit: 9.* + - laravel: 9.* + testbench: 7.* + phpunit: 9.* + - laravel: 10.* + testbench: 8.* + phpunit: 9.* + - laravel: 11.* + testbench: 9.* + phpunit: 10.* + exclude: + - laravel: 8.* + php: 8.2 + - laravel: 8.* + php: 8.3 + - laravel: 10.* + php: 8.0 + - laravel: 11.* + php: 8.0 + - laravel: 11.* + php: 8.1 + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: @@ -28,9 +48,9 @@ jobs: - name: Get Composer Cache Directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -44,7 +64,7 @@ jobs: - name: Install PHP dependencies run: | composer config --ansi -- "http-basic.nova.laravel.com" ${{ secrets.NOVA_USERNAME }} ${{ secrets.NOVA_PASSWORD }} - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - name: Run PHP tests diff --git a/README.md b/README.md index a5fb941..21e51f1 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,9 @@ [Return To Top](#nova-publish) -- PHP 7.4 -- GitHub Actions workflow +- PHP 8.0, 8.1, 8.2 +- Laravel 8, 9, 10 +- Nova 4 ## Installation @@ -67,6 +68,18 @@ php artisan vendor:publish --provider="Publish\ToolServiceProvider" Configure GitHub credentials, set the path to the workflow file and configure an application version. +======= + +## Local development + +Run `npm run dev` to watch for changes in the `resources/js` directory. + +Use the local checkout in a project that uses this plugin. [The Composer documentation explains how to do this.](https://getcomposer.org/doc/05-repositories.md#path) + +## i18n + +To add a language or change an existing translation, please read the [Laravel documentation about overriding package language files](https://laravel.com/docs/10.x/localization#overriding-package-language-files). + ## GitHub API credentials Personal Access Tokens (PATs) are currently the only way to access the GitHub API. The token is created by a GitHub user. So when this user is removed from the GitHub organization the token must be recreated by another user. Not ideal, so there is room for improvement. diff --git a/composer.json b/composer.json index c88dd1c..2ab281e 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "license": "MIT", "require": { - "php": "^8.0|^7.4", + "php": "^8.0|^8.1|^8.2|^8.3", "guzzlehttp/guzzle": "^7.3", "laravel/nova": "^4.0" }, diff --git a/package.json b/package.json index 8760c25..909e39b 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,9 @@ "production": "mix --production", "nova:install": "yarn --cwd ./vendor/laravel/nova --frozen-lockfile" }, + "engines": { + "node": "22" + }, "devDependencies": { "@vue/compiler-sfc": "^3.2.22", "laravel-mix": "^6.0.41",