Skip to content

Commit acece60

Browse files
committed
Merge branch 'develop' into trunk
2 parents 3bee051 + c5496a0 commit acece60

File tree

16 files changed

+6016
-3546
lines changed

16 files changed

+6016
-3546
lines changed

.github/workflows/build-release-zip.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Build release zip
22

33
on:
44
workflow_dispatch:
5+
workflow_call:
56
push:
67
branches:
78
- trunk

.github/workflows/cypress.yml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ on:
55
branches:
66
- develop
77
jobs:
8+
build:
9+
uses: 10up/maps-block-apple/.github/workflows/build-release-zip.yml@develop
810
cypress:
11+
needs: build
912
name: ${{ matrix.core.name }}
1013
runs-on: ubuntu-latest
1114
strategy:
@@ -17,13 +20,30 @@ jobs:
1720
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
1821
steps:
1922
- name: Checkout
20-
uses: actions/checkout@v2
23+
uses: actions/checkout@v3
24+
- name: Download build zip
25+
uses: actions/download-artifact@v3
26+
with:
27+
name: ${{ github.event.repository.name }}
28+
path: ${{ github.event.repository.name }}
29+
- name: Display structure of downloaded files
30+
run: ls -R
31+
working-directory: ${{ github.event.repository.name }}
32+
- name: Cache node_modules
33+
id: cache-node-modules
34+
uses: actions/cache@v3
35+
env:
36+
cache-name: cache-node-modules
37+
with:
38+
path: |
39+
node_modules
40+
~/.cache
41+
~/.npm
42+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
2143
- name: Install dependencies
2244
run: npm install
23-
- name: Build (optional)
24-
run: npm run build
25-
- name: Set the core version
26-
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}
45+
- name: Set the core version and plugins config
46+
run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }}
2747
- name: Set up WP environment
2848
run: npm run env:start
2949
- name: Test
@@ -32,3 +52,22 @@ jobs:
3252
CYPRESS_MAPS_PRIVATE_KEY: ${{ secrets.MAPS_PRIVATE_KEY }}
3353
CYPRESS_MAPS_KEY_ID: ${{ secrets.MAPS_KEY_ID }}
3454
CYPRESS_MAPS_TEAM_ID: ${{ secrets.MAPS_TEAM_ID }}
55+
- name: Update summary
56+
if: always()
57+
run: |
58+
npx mochawesome-merge ./tests/cypress/reports/*.json -o tests/cypress/reports/mochawesome.json
59+
rm -rf ./tests/cypress/reports/mochawesome-*.json
60+
npx mochawesome-json-to-md -p ./tests/cypress/reports/mochawesome.json -o ./tests/cypress/reports/mochawesome.md
61+
npx mochawesome-report-generator tests/cypress/reports/mochawesome.json -o tests/cypress/reports/
62+
cat ./tests/cypress/reports/mochawesome.md >> $GITHUB_STEP_SUMMARY
63+
- name: Make artifacts available
64+
uses: actions/upload-artifact@v3
65+
if: failure()
66+
with:
67+
name: cypress-artifact
68+
retention-days: 2
69+
path: |
70+
${{ github.workspace }}/tests/cypress/screenshots/
71+
${{ github.workspace }}/tests/cypress/videos/
72+
${{ github.workspace }}/tests/cypress/logs/
73+
${{ github.workspace }}/tests/cypress/reports/

.github/workflows/dependency-review.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,8 @@ jobs:
1717
- name: 'Checkout Repository'
1818
uses: actions/checkout@v3
1919
- name: Dependency Review
20-
uses: actions/dependency-review-action@v2
20+
uses: actions/dependency-review-action@v3
2121
with:
22-
# Possible values: "critical", "high", "moderate", "low"
23-
# fail-on-severity: critical
24-
25-
# You can only can only include one of these two options: `allow-licenses` and `deny-licences`
26-
# ([String]). Only allow these licenses (optional)
27-
# Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses
28-
# The following list is an attempt to match exactly what's listed on https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses as GPL Compatible (currently ignoring the FSF Free/Libre and OSI Approved column data from the SPDX License List at https://spdx.org/licenses/):
29-
allow-licenses: GPL-2.0, GPL-2.0-only, GPL-2.0-or-later, GPL-3.0, GPL-3.0-only, GPL-3.0-or-later, LGPL-3.0, LGPL-3.0-only, LGPL-2.1, LGPL-2.1-only, AGPL-3.0, AGPL-3.0-only, Apache-2.0, Artistic-2.0, Sleepycat, BSL-1.0, BSD-3-Clause, ECL-2.0, EFL-2.0, EUDatagrid, MIT, BSD-2-Clause, HPND, Intel, ISC, MPL-2.0, NCSA, UPL-1.0, Unlicense, W3C, Zlib, ZPL-2.0
30-
# The following licenses fit the above criteria except they are not marked as FSF Free/Libre on the SPDX License List (https://spdx.org/licenses/): Unicode-DFS-2016
31-
# The following licenses fit the above criteria except they are not marked as OSI Approved on the SPDX License List (https://spdx.org/licenses/): ClArtistic, CECILL-2.0, BSD-3-Clause-Clear, FTL, iMatix, Imlib2, IJG, OLDAP-2.7, Ruby, SGI-B-2.0, SMLNJ, Vim, WTFPL, X11, XFree86-1.1
32-
# ([String]). Block the pull request on these licenses (optional)
33-
# Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses
34-
# The following list is an attempt to match exactly what's listed on https://www.gnu.org/licenses/license-list.html#GPLIncompatibleLicenses as GPL Incompatible:
35-
# deny-licenses: AGPL-1.0, AGPL-1.0-only, AFL-1.1, AFL-1.2, AFL-2.0, AFL-2.1, AFL-3.0, Apache-1.1, Apache-1.0, APSL-2.0, BitTorrent-1.0, BSD-4-Clause, CECILL-B, CECILL-C, CDDL-1.0, CPAL-1.0, CPL-1.0, Condor-1.1, EPL-1.0, EPL-2.0, EUPL-1.1, EUPL-1.2, FDK-AAC, gnuplot, IPL-1.0, LPPL-1.3a, LPPL-1.2, LPL-1.02, MS-PL, MS-RL, MPL-1.1, NOSL, NPL-1.0, NPL-1.1, Nokia, OLDAP-2.3, OSL-1.0, OSL-1.1, OSL-2.0, OSL-2.1, OSL-3.0, OpenSSL, PHP-3.01, Python-2.0, QPL-1.0, RPSL-1.0, SISSL, SPL-1.0, xinetd, YPL-1.1, Zend-2.0, Zimbra-1.3, ZPL-1.1
36-
# The following list is an attempt, additionally, to match exactly what's listedn on https://www.gnu.org/licenses/license-list.html#NonFreeSoftwareLicenses as Nonfree: Aladdin, APSL-1.0, APSL-1.1, APSL-1.2, Artistic-1.0, CPOL-1.02, RHeCos-1.1, JSON, NASA-1.3, OPL-1.0, RPL-1.1, Watcom-1.0
22+
license-check: true
23+
vulnerability-check: false
24+
config-file: 10up/.github/.github/dependency-review-config.yml@trunk

.github/workflows/linting.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
continue-on-error: true
2323
- name: Annotate code linting results
2424
uses: ataylorme/eslint-annotate-action@1.2.0
25+
if: ${{ github.actor != 'dependabot[bot]' }} # dependabot doesn't have permissions
2526
with:
2627
repo-token: '${{ secrets.GITHUB_TOKEN }}'
2728
report-json: 'eslint-report.json'
@@ -45,3 +46,23 @@ jobs:
4546
npx github:10up/phpcs-json-to-md --path ./phpcs-report.json --output ./phpcs-report.md
4647
cat phpcs-report.md >> $GITHUB_STEP_SUMMARY
4748
if: ${{ failure() }}
49+
php_compatibility:
50+
name: PHP minimum 7.4
51+
runs-on: ubuntu-latest
52+
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v2
56+
57+
- name: Set PHP version
58+
uses: shivammathur/setup-php@v2
59+
with:
60+
php-version: 7.4
61+
tools: composer:v2
62+
coverage: none
63+
64+
- name: Install dependencies
65+
run: composer install
66+
67+
- name: Run PHP Compatibility
68+
run: vendor/bin/phpcs maps-block-apple.php includes/ -p --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4-

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ Desktop.ini
3232
.env
3333

3434
.wp-env.override.json
35-
tests/cypress/screenshots/
36-
tests/cypress/videos/
35+
tests/cypress/downloads
36+
tests/cypress/screenshots
37+
tests/cypress/videos
38+
tests/cypress/reports

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file, per [the Ke
44

55
## [Unreleased] - TBD
66

7+
## [1.1.1] - 2023-06-21
8+
**Note that this release bumps the PHP minimum supported version from 5.6 to 7.4.**
9+
10+
### Added
11+
- Mochawesome reporter added for Cypress test report (props [@jayedul](https://github.com/jayedul), [@iamdharmesh](https://github.com/iamdharmesh) via [#168](https://github.com/10up/maps-block-apple/pull/168)).
12+
13+
### Changed
14+
- Bump PHP minimum supported version from 5.6 to 7.4 (props [@jayedul](https://github.com/jayedul), [@csloisel](https://github.com/csloisel), [@faisal-alvi](https://github.com/faisal-alvi), [@dkotter](https://github.com/dkotter) via [#133](https://github.com/10up/maps-block-apple/pull/133)).
15+
- Run E2E tests on the zip generated by "Build release zip" action (props [@jayedul](https://github.com/jayedul), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#163](https://github.com/10up/maps-block-apple/pull/163)).
16+
- Bump WordPress "tested up to" version to 6.2 (props [@jayedul](https://github.com/jayedul), [@peterwilsoncc](https://github.com/peterwilsoncc), [@Sidsector9](https://github.com/Sidsector9) via [#165](https://github.com/10up/maps-block-apple/pull/165), [#167](https://github.com/10up/maps-block-apple/pull/167)).
17+
- Update Cypress E2E and Dependency Review GitHub Actions (props [@jayedul](https://github.com/jayedul), [@jeffpaul](https://github.com/jeffpaul), [@Sidsector9](https://github.com/Sidsector9) via [#166](https://github.com/10up/maps-block-apple/pull/166), [#169](https://github.com/10up/maps-block-apple/pull/169)).
18+
19+
### Security
20+
- Bump `simple-git` from 3.15.1 to 3.16.0 (props [@dependabot](https://github.com/apps/dependabot) via [#158](https://github.com/10up/maps-block-apple/pull/158)).
21+
- Bump `http-cache-semantics` from 4.1.0 to 4.1.1 (props [@dependabot](https://github.com/apps/dependabot) via [#159](https://github.com/10up/maps-block-apple/pull/159)).
22+
- Bump `@sideway/formula` from 3.0.0 to 3.0.1 (props [@dependabot](https://github.com/apps/dependabot) via [#160](https://github.com/10up/maps-block-apple/pull/160)).
23+
- Bump `webpack` from 5.73.0 to 5.76.1 (props [@dependabot](https://github.com/apps/dependabot) via [#162](https://github.com/10up/maps-block-apple/pull/162)).
24+
725
## [1.1.0] - 2023-01-23
826
**Note that this release bumps the WordPress minimum version from 5.2 to 5.8.**
927

@@ -108,6 +126,7 @@ All notable changes to this project will be documented in this file, per [the Ke
108126
- Initial private release of Block for Apple Maps plugin.
109127

110128
[Unreleased]: https://github.com/10up/maps-block-apple/compare/trunk...develop
129+
[1.1.1]: https://github.com/10up/maps-block-apple/compare/1.1.0...1.1.1
111130
[1.1.0]: https://github.com/10up/maps-block-apple/compare/1.0.3...1.1.0
112131
[1.0.3]: https://github.com/10up/maps-block-apple/compare/1.0.2...1.0.3
113132
[1.0.2]: https://github.com/10up/maps-block-apple/compare/1.0.1...1.0.2

CREDITS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo
1010

1111
Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.
1212

13-
[Helen Hou-Sandi (@helen)](https://github.com/helen), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Justin Kopepasah (@kopepasah)](https://github.com/kopepasah), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Fabian Kägy (@fabiankaegy)](https://github.com/fabiankaegy), [Jackie Kjome (@JackieKjome)](https://github.com/JackieKjome), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabot), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Joshua Abenazer (@joshuaabenazer)](https://github.com/joshuaabenazer), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Ankit K Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [Crisoforo Gaspar Hernández (@mitogh)](https://github.com/mitogh), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Max Lyuchin (@cadic)](https://github.com/cadic), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Darin Kotter (@dkotter)](https://github.com/dkotter).
13+
[Helen Hou-Sandi (@helen)](https://github.com/helen), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Justin Kopepasah (@kopepasah)](https://github.com/kopepasah), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Fabian Kägy (@fabiankaegy)](https://github.com/fabiankaegy), [Jackie Kjome (@JackieKjome)](https://github.com/JackieKjome), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabot), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Joshua Abenazer (@joshuaabenazer)](https://github.com/joshuaabenazer), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Ankit K. Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [Crisoforo Gaspar Hernández (@mitogh)](https://github.com/mitogh), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Max Lyuchin (@cadic)](https://github.com/cadic), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Jayedul Kabir (@jayedul)](https://github.com/jayedul), [Curtis Loisel (@csloisel)](https://github.com/csloisel)
1414

1515
## Libraries
1616

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ This plugin integrates Apple's [MapKit JS](https://developer.apple.com/maps/mapk
1414

1515
## Requirements
1616

17-
* PHP 5.6+
18-
* [WordPress](http://wordpress.org/) 5.2+
17+
* PHP 7.4+
18+
* [WordPress](http://wordpress.org/) 5.8+
1919
* Due to the requirements applied by Apple to use Apple Maps ([MapkitJS](https://developer.apple.com/maps/mapkitjs/)), Apple Maps for WordPress requires an [Apple Developer](https://developer.apple.com/) [account](https://developer.apple.com/account/) and enrollment within the [Apple Developer Program](https://developer.apple.com/programs/).
2020

2121
## Installation

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
}
1515
],
1616
"require-dev": {
17-
"wp-coding-standards/wpcs": "^2.2",
18-
"dealerdirect/phpcodesniffer-composer-installer": "dev-master"
17+
"10up/phpcs-composer": "dev-master"
1918
},
2019
"scripts": {
2120
"lint": "./vendor/bin/phpcs",
22-
"lint-fix": "./vendor/bin/phpcbf --extensions=php ."
21+
"lint-fix": "./vendor/bin/phpcbf --extensions=php .",
22+
"phpcs:compat": "vendor/bin/phpcs maps-block-apple.php includes/ -p --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4-"
2323
},
2424
"minimum-stability": "dev",
2525
"config": {

maps-block-apple.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* Plugin Name: Block for Apple Maps
44
* Plugin URI: https://github.com/10up/maps-block-apple
55
* Description: An Apple Maps block for the WordPress block editor (Gutenberg).
6-
* Version: 1.1.0
6+
* Version: 1.1.1
77
* Requires at least: 5.8
8-
* Requires PHP: 5.6
8+
* Requires PHP: 7.4
99
* Author: 10up
1010
* Author URI: https://10up.com
1111
* License: GPLv2 or later
@@ -18,22 +18,22 @@
1818
namespace tenup\Maps_Block_Apple;
1919

2020
// Useful global constants.
21-
define( 'MAPS_BLOCK_APPLE_VERSION', '1.1.0' );
21+
define( 'MAPS_BLOCK_APPLE_VERSION', '1.1.1' );
2222
define( 'MAPS_BLOCK_APPLE_URL', plugin_dir_url( __FILE__ ) );
2323
define( 'MAPS_BLOCK_APPLE_PATH', dirname( __FILE__ ) . '/' );
2424
define( 'MAPS_BLOCK_APPLE_INC', MAPS_BLOCK_APPLE_PATH . 'includes/' );
2525
define( 'MAPS_BLOCK_APPLE_BASENAME', plugin_basename( __FILE__ ) );
2626

2727
/**
28-
* Require WP version 5.2+ beacuse of hooks.
29-
* PHP 5.6 errors should be caught in the sandbox during activation.
28+
* Require WP version >=5.8
29+
* PHP 7.4 errors should be caught in the sandbox during activation.
3030
*/
3131
register_activation_hook(
3232
__FILE__,
3333
function() {
34-
if ( ! version_compare( $GLOBALS['wp_version'], '5.2', '>=' ) ) {
34+
if ( ! version_compare( $GLOBALS['wp_version'], '5.8', '>=' ) ) {
3535
wp_die(
36-
esc_html__( 'Block for Apple Maps requires WordPress version 5.2 or greater.', 'maps-block-apple' ),
36+
esc_html__( 'Block for Apple Maps requires WordPress version 5.8 or greater.', 'maps-block-apple' ),
3737
esc_html__( 'Error Activating', 'maps-block-apple' )
3838
);
3939
}

0 commit comments

Comments
 (0)