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

Bugfix/radio control #27

Merged
merged 6 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"env": {
"browser": true,
"jquery": true
Expand All @@ -8,7 +8,7 @@
"wp": false
},
"extends": [
"plugin:@wordpress/eslint-plugin/recommended"
"plugin:@wordpress/eslint-plugin/recommended-with-formatting"
],
"rules": {
"no-alert": "off",
Expand Down
7 changes: 6 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
.github/ export-ignore
tests/ export-ignore
bin/ export-ignore
.browserslistrc export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.editorconfig export-ignore
.eslintrc export-ignore
.stylelintrc.json export-ignore
.wp-env.json export-ignore
.node-version export-ignore
composer.lock export-ignore
gulpfile.js export-ignore
hamepub export-ignore
phpcs.ruleset.xml export-ignore
phpunit.xml export-ignore
hamepub export-ignore
webpack-config.js
wpametu.php export-ignore
48 changes: 39 additions & 9 deletions .github/workflows/wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ on:

jobs:
test:
runs-on: ${{ matrix.operating-system }}
runs-on: ubuntu-latest
strategy:
matrix:
operating-system: [ ubuntu-latest ] # OS. ubuntu-18.04 is also available.
php: [ '7.2', '7.4' ] # PHP versions to check.
wp: [ 'latest', '5.9' ] # WordPress version to check.
php: [ '7.2', '7.4', '8.0' ] # PHP versions to check.
wp: [ 'latest', '6.1' ] # WordPress version to check.
services:
mysql:
image: mysql:8
Expand Down Expand Up @@ -52,12 +51,32 @@ jobs:
- name: Install WordPress
run: bash bin/install-wp-tests.sh wordpress root root 127.0.0.1:3306 ${{ matrix.wp }}

- name: Run PHP Lint
run: composer phpcs

- name: Run PHP Unit Test
run: composer test

lint:
runs-on: ubuntu-latest
name: PHP Syntax Check
steps:
- uses: actions/checkout@master

- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
tools: composer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run PHP Lint
run: composer phpcs

assets:
runs-on: ubuntu-latest
name: Assets Test
Expand All @@ -67,17 +86,28 @@ jobs:
- name: Install NPM
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '16'

- name: Install Packages
run: npm install

- name: Stylelint and ESlint
run: npm run lint

- name: Check Build succeed
run: npm run build

status-check:
runs-on: ubuntu-latest
name: Check Status
needs: [test, assets, lint]
steps:
- name: Display Status
run: echo "All Green!"

release:
name: Upload Release
needs: [test, assets]
needs: [status-check]
if: contains(github.ref, 'tags/')
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.19.0
16.20.0
125 changes: 2 additions & 123 deletions assets/css/admin-metabox.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

123 changes: 1 addition & 122 deletions assets/css/batch-screen.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
"hametuha/pattern": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^6|^7",
"phpunit/phpunit": ">=7",
"squizlabs/php_codesniffer": "^3.0",
"wp-coding-standards/wpcs": "^2.0",
"yoast/phpunit-polyfills": "^1.0",
"yoast/wp-test-utils": "^1.0",
"yoast/phpunit-polyfills": "^2.0",
"phpcompatibility/php-compatibility": "^9.3",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0"

Expand Down
Loading
Loading