Skip to content

Commit

Permalink
Merge pull request #969 from tomusborne/release/1.8.0
Browse files Browse the repository at this point in the history
Release: 1.8.0
  • Loading branch information
tomusborne authored Jul 18, 2023
2 parents e0b4e46 + a69d124 commit c8264be
Show file tree
Hide file tree
Showing 217 changed files with 25,179 additions and 15,363 deletions.
2 changes: 2 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.wordpress-org
/.git
/.github
tests

.distignore
.DS_Store
Expand All @@ -15,3 +16,4 @@ composer.json
composer.lock
phpcs.xml.dist
Gruntfile.js
phpunit.xml
54 changes: 42 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ jobs:
if: steps.js-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
cache: 'npm'

- name: Download deps
if: steps.js-files.outputs.any_changed == 'true'
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: Lint
if: steps.js-files.outputs.any_changed == 'true'
Expand All @@ -78,13 +77,12 @@ jobs:
if: steps.js-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
cache: 'npm'

- name: Download deps
if: steps.js-files.outputs.any_changed == 'true'
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: Run tests
if: steps.js-files.outputs.any_changed == 'true'
Expand Down Expand Up @@ -113,13 +111,12 @@ jobs:
if: steps.js-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
cache: 'npm'

- name: Download deps
if: steps.js-files.outputs.any_changed == 'true'
uses: bahmutov/npm-install@v1
with:
useLockFile: false

- name: Build files
if: steps.js-files.outputs.any_changed == 'true'
Expand All @@ -139,7 +136,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['5.6', '7.4', '8.1']
php-versions: ['7.2', '7.4', '8.1']
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand All @@ -165,12 +162,45 @@ jobs:

- name: Lint
if: steps.php-files.outputs.any_changed == 'true'
run: composer run-script php
run: composer run-script lint

php-tests:
name: PHP Tests
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2']
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check changed files
id: 'php-files'
uses: tj-actions/[email protected]
with:
files: |
**/*.php
- name: Setup PHP
if: steps.php-files.outputs.any_changed == 'true'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Download deps
if: steps.php-files.outputs.any_changed == 'true'
uses: ramsey/composer-install@v2

- name: Test
if: steps.php-files.outputs.any_changed == 'true'
run: composer run-script test

build-package:
name: Build package
runs-on: ubuntu-latest
needs: [js-lint, js-tests, php-lint]
needs: [js-lint, js-tests, php-lint, php-tests]
if: github.event.inputs.build-package == 'true'
steps:
- name: Checkout repo
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ composer.lock
## Uncomment line below if you prefer to
## keep compiled files out of version control
# dist/
.phpunit.result.cache
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module.exports = function( grunt ) {
};
} );

fs.writeFile( 'src/components/typography/google-fonts.json', JSON.stringify( fonts, undefined, 4 ), function( err ) {
fs.writeFile( 'src/extend/inspector-controls/controls/typography/google-fonts.json', JSON.stringify( fonts, undefined, 4 ), function( err ) {
if ( ! err ) {
// eslint-disable-next-line no-console
console.log( 'Google Fonts Updated!' );
Expand Down
27 changes: 20 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@
"wp-coding-standards/wpcs" : "^2.3.0",
"php-parallel-lint/php-parallel-lint": "^1.2.0",
"phpcompatibility/phpcompatibility-wp": "^2.1.0",
"wp-cli/i18n-command": "^2.2.5"
"wp-cli/i18n-command": "^2.2.5",
"phpunit/phpunit": "^8.0",
"brain/monkey": "^2.6"
},
"scripts": {
"php": [
"lint": [
"phpcs -p .",
"parallel-lint --exclude .git --exclude vendor --exclude node_modules .",
"phpcs -p . --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 5.6- --ignore=*/vendor/,*/node_modules/"
"phpcs -p . --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 5.6- --ignore=*/vendor/,*/node_modules/,*/tests/"
],
"lint:wpcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs",
"lint:php": "@php ./vendor/bin/parallel-lint --exclude .git --exclude vendor --exclude node_modules .",
"make-pot": "wp i18n make-pot . languages/_s.pot"
"lint:wpcs": "@lint ./vendor/squizlabs/php_codesniffer/bin/phpcs",
"lint:php": "@lint ./vendor/bin/parallel-lint --exclude .git --exclude vendor --exclude node_modules .",
"make-pot": "wp i18n make-pot . languages/_s.pot",
"test": "phpunit"
},
"support": {
"issues": "https://github.com/tomusborne/generateblocks/issues",
Expand All @@ -42,5 +45,15 @@
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
},
"autoload": {
"classmap": [
"includes/"
]
},
"autoload-dev": {
"psr-4": {
"GenerateBlocks\\Tests\\": "tests/"
}
}
}
2 changes: 1 addition & 1 deletion dist/blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-rich-text'), 'version' => 'fc33cdae48a8ae3099c0');
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-rich-text'), 'version' => 'd8d751036ae0cdf62115');
Loading

0 comments on commit c8264be

Please sign in to comment.