Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update CI and switch some tooling to Laravel ecosystem #106

Merged
merged 7 commits into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/auto-format-code.yml
Original file line number Diff line number Diff line change
@@ -21,12 +21,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup NodeJS
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
@@ -37,20 +37,17 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.3'
extensions: exif,json,mbstring
coverage: none

- name: Configure local Laravel Nova dummy package
run: |
composer config repositories.0 path ./tests/Fixtures/nova
git update-index --assume-unchanged composer.json composer.lock
git update-index --assume-unchanged composer.json

- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--ignore-platform-req=php"
dependency-versions: highest # No lockfile is present, so locked (the default) isn't possible
uses: ramsey/composer-install@v3

- name: Lint code
run: |
@@ -72,8 +69,8 @@ jobs:
exit 1

- name: Commit changes (push only)
if: ${{ github.event_name == 'push' }}
uses: stefanzweifel/git-auto-commit-action@v4.16.0
if: github.event_name == 'push'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fixed code style using PHP-CS-Fixer
commit_message:' chore: fixed code formatting issues'

18 changes: 12 additions & 6 deletions .github/workflows/test.yml → .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ jobs:
php:
- '8.2'
- '8.3'
- nightly

laravel:
- '10.0'
@@ -28,10 +29,15 @@ jobs:
testbench: '8.0'
- laravel: '11.0'
testbench: '9.0'
- php: 8.3
laravel: '11.0'
stable: true
- php: nightly
experimental: true

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -49,9 +55,9 @@ jobs:
run: composer config repositories.0 path ./tests/Fixtures/nova

- name: Install Composer dependencies
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3
with:
dependency-versions: highest # We're installing additional packages, and cannot use the lockfile
composer-options: "--ignore-platform-req=php"

- name: Run unit tests with coverage and printer
id: phpunit
@@ -62,7 +68,7 @@ jobs:
--coverage-clover ./coverage-clover.xml

- name: Report test results
if: ${{ success() || failure() }}
if: success() || failure()
uses: mikepenz/action-junit-report@v4
with:
report_paths: ./report-junit.xml
@@ -74,8 +80,8 @@ jobs:
PHPUnit version: `${{ steps.phpunit.outputs.phpunit_version }}`

- name: Determine coverage
uses: slavcodev/coverage-monitor-action@1.8.0
if: ${{ github.event_name == 'pull_request' && matrix.stable == true }}
uses: slavcodev/coverage-monitor-action@1.9.0
if: github.event_name == 'pull_request' && matrix.stable == true
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -5,3 +5,4 @@
.DS_Store
Thumbs.db
.php-cs-fixer.cache
/composer.lock
32 changes: 0 additions & 32 deletions .php-cs-fixer.dist.php

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `EditorJsThumbnailCreated` event that triggers when a thumbnail is generated. Via #98 by @woeler.
- Added Laravel 11 support. Via #104 by @woeler.
- Dropped Laravel 9 support. Via #104 by @woeler.
- Updated GitHub Actions to Node v20, via #106 by @roelofr.
- Updated auto-formatter to use PHP 8.3, via #106 by @roelofr.

## [3.3.0]

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@
[![Latest Version on Github](https://img.shields.io/github/release/advoor/nova-editor-js.svg?style=flat-square)](https://packagist.org/packages/advoor/nova-editor-js)
[![Total Downloads](https://img.shields.io/packagist/dt/advoor/nova-editor-js.svg?style=flat-square)](https://packagist.org/packages/advoor/nova-editor-js)

A Laravel Nova implementation of [Editor.js](https://github.com/codex-team/editor.js) by [@advoor](https://github.com/advoor).
A Laravel Nova implementation of [Editor.js](https://github.com/codex-team/editor.js)
by [@advoor](https://github.com/advoor).

## Installation

@@ -26,6 +27,7 @@ Please use the below table to find which versions are suitable for your installa

| Package version | Nova Version | Laravel Version | PHP version |
| --------------- | ------------ | --------------- | ----------- |
| `4.x` | 4.x | 10.x - 11.x | 8.2+ |
| `3.x` | 4.x | 8.x - 10.x | 8.1+ |
| `2.x` | 2.x - 3.x | 5.x - 8.x | 5.6 - 7.4 |

@@ -117,7 +119,8 @@ From the config, you can define the following editor settings:

- `placeholder` ([docs][placeholder-docs]) - The placeholder to show in an empty editor
- `defaultBlock` ([docs][defaultblock-docs]) - The block that's used by default
- `autofocus` ([docs][autofocus-docs]) - If the editor should auto-focus, only use if you never have multiple editors on a page and after considering the
- `autofocus` ([docs][autofocus-docs]) - If the editor should auto-focus, only use if you never have multiple editors on
a page and after considering the
[accessibility implications][autofocus-accessibility]
- `rtl` ([docs][rtl-docs]) - Set to true to enable right-to-left mode, for languages like Arabic and Hebrew

@@ -149,4 +152,5 @@ content. It does not have an entry in the "Add" menu.

### Registering custom components

Please refer to the [extending Nova EditorJS](./EXTENDING.md) guide on instructions on how to register custom components.
Please refer to the [extending Nova EditorJS](./EXTENDING.md) guide on instructions on how to register custom
components.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
"spatie/image": "^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.9",
"laravel/pint": "^1.15",
"orchestra/testbench": "^8.0 || ^9.0",
"php-parallel-lint/php-parallel-lint": "^1.3"
},
@@ -44,7 +44,7 @@
"parallel-lint --exclude .git --exclude vendor ."
],
"format": [
"php-cs-fixer fix"
"pint"
]
},
"scripts-descriptions": {
Loading