Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Jun 21, 2023
2 parents 3bee051 + c5496a0 commit acece60
Show file tree
Hide file tree
Showing 16 changed files with 6,016 additions and 3,546 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-release-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build release zip

on:
workflow_dispatch:
workflow_call:
push:
branches:
- trunk
Expand Down
49 changes: 44 additions & 5 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ on:
branches:
- develop
jobs:
build:
uses: 10up/maps-block-apple/.github/workflows/build-release-zip.yml@develop
cypress:
needs: build
name: ${{ matrix.core.name }}
runs-on: ubuntu-latest
strategy:
Expand All @@ -17,13 +20,30 @@ jobs:
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Download build zip
uses: actions/download-artifact@v3
with:
name: ${{ github.event.repository.name }}
path: ${{ github.event.repository.name }}
- name: Display structure of downloaded files
run: ls -R
working-directory: ${{ github.event.repository.name }}
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
node_modules
~/.cache
~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm install
- name: Build (optional)
run: npm run build
- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}
- name: Set the core version and plugins config
run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }}
- name: Set up WP environment
run: npm run env:start
- name: Test
Expand All @@ -32,3 +52,22 @@ jobs:
CYPRESS_MAPS_PRIVATE_KEY: ${{ secrets.MAPS_PRIVATE_KEY }}
CYPRESS_MAPS_KEY_ID: ${{ secrets.MAPS_KEY_ID }}
CYPRESS_MAPS_TEAM_ID: ${{ secrets.MAPS_TEAM_ID }}
- name: Update summary
if: always()
run: |
npx mochawesome-merge ./tests/cypress/reports/*.json -o tests/cypress/reports/mochawesome.json
rm -rf ./tests/cypress/reports/mochawesome-*.json
npx mochawesome-json-to-md -p ./tests/cypress/reports/mochawesome.json -o ./tests/cypress/reports/mochawesome.md
npx mochawesome-report-generator tests/cypress/reports/mochawesome.json -o tests/cypress/reports/
cat ./tests/cypress/reports/mochawesome.md >> $GITHUB_STEP_SUMMARY
- name: Make artifacts available
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-artifact
retention-days: 2
path: |
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/
${{ github.workspace }}/tests/cypress/reports/
20 changes: 4 additions & 16 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,8 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v2
uses: actions/dependency-review-action@v3
with:
# Possible values: "critical", "high", "moderate", "low"
# fail-on-severity: critical

# You can only can only include one of these two options: `allow-licenses` and `deny-licences`
# ([String]). Only allow these licenses (optional)
# Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses
# 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/):
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
# 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
# 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
# ([String]). Block the pull request on these licenses (optional)
# Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses
# 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:
# 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
# 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
license-check: true
vulnerability-check: false
config-file: 10up/.github/.github/dependency-review-config.yml@trunk
21 changes: 21 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
continue-on-error: true
- name: Annotate code linting results
uses: ataylorme/[email protected]
if: ${{ github.actor != 'dependabot[bot]' }} # dependabot doesn't have permissions
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
report-json: 'eslint-report.json'
Expand All @@ -45,3 +46,23 @@ jobs:
npx github:10up/phpcs-json-to-md --path ./phpcs-report.json --output ./phpcs-report.md
cat phpcs-report.md >> $GITHUB_STEP_SUMMARY
if: ${{ failure() }}
php_compatibility:
name: PHP minimum 7.4
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer:v2
coverage: none

- name: Install dependencies
run: composer install

- name: Run PHP Compatibility
run: vendor/bin/phpcs maps-block-apple.php includes/ -p --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4-
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ Desktop.ini
.env

.wp-env.override.json
tests/cypress/screenshots/
tests/cypress/videos/
tests/cypress/downloads
tests/cypress/screenshots
tests/cypress/videos
tests/cypress/reports
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [1.1.1] - 2023-06-21
**Note that this release bumps the PHP minimum supported version from 5.6 to 7.4.**

### Added
- 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)).

### Changed
- 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)).
- 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)).
- 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)).
- 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)).

### Security
- 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)).
- 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)).
- 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)).
- 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)).

## [1.1.0] - 2023-01-23
**Note that this release bumps the WordPress minimum version from 5.2 to 5.8.**

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

[Unreleased]: https://github.com/10up/maps-block-apple/compare/trunk...develop
[1.1.1]: https://github.com/10up/maps-block-apple/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/10up/maps-block-apple/compare/1.0.3...1.1.0
[1.0.3]: https://github.com/10up/maps-block-apple/compare/1.0.2...1.0.3
[1.0.2]: https://github.com/10up/maps-block-apple/compare/1.0.1...1.0.2
Expand Down
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo

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

[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).
[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)

## Libraries

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ This plugin integrates Apple's [MapKit JS](https://developer.apple.com/maps/mapk

## Requirements

* PHP 5.6+
* [WordPress](http://wordpress.org/) 5.2+
* PHP 7.4+
* [WordPress](http://wordpress.org/) 5.8+
* 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/).

## Installation
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
}
],
"require-dev": {
"wp-coding-standards/wpcs": "^2.2",
"dealerdirect/phpcodesniffer-composer-installer": "dev-master"
"10up/phpcs-composer": "dev-master"
},
"scripts": {
"lint": "./vendor/bin/phpcs",
"lint-fix": "./vendor/bin/phpcbf --extensions=php ."
"lint-fix": "./vendor/bin/phpcbf --extensions=php .",
"phpcs:compat": "vendor/bin/phpcs maps-block-apple.php includes/ -p --standard=PHPCompatibilityWP --extensions=php --runtime-set testVersion 7.4-"
},
"minimum-stability": "dev",
"config": {
Expand Down
14 changes: 7 additions & 7 deletions maps-block-apple.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Plugin Name: Block for Apple Maps
* Plugin URI: https://github.com/10up/maps-block-apple
* Description: An Apple Maps block for the WordPress block editor (Gutenberg).
* Version: 1.1.0
* Version: 1.1.1
* Requires at least: 5.8
* Requires PHP: 5.6
* Requires PHP: 7.4
* Author: 10up
* Author URI: https://10up.com
* License: GPLv2 or later
Expand All @@ -18,22 +18,22 @@
namespace tenup\Maps_Block_Apple;

// Useful global constants.
define( 'MAPS_BLOCK_APPLE_VERSION', '1.1.0' );
define( 'MAPS_BLOCK_APPLE_VERSION', '1.1.1' );
define( 'MAPS_BLOCK_APPLE_URL', plugin_dir_url( __FILE__ ) );
define( 'MAPS_BLOCK_APPLE_PATH', dirname( __FILE__ ) . '/' );
define( 'MAPS_BLOCK_APPLE_INC', MAPS_BLOCK_APPLE_PATH . 'includes/' );
define( 'MAPS_BLOCK_APPLE_BASENAME', plugin_basename( __FILE__ ) );

/**
* Require WP version 5.2+ beacuse of hooks.
* PHP 5.6 errors should be caught in the sandbox during activation.
* Require WP version >=5.8
* PHP 7.4 errors should be caught in the sandbox during activation.
*/
register_activation_hook(
__FILE__,
function() {
if ( ! version_compare( $GLOBALS['wp_version'], '5.2', '>=' ) ) {
if ( ! version_compare( $GLOBALS['wp_version'], '5.8', '>=' ) ) {
wp_die(
esc_html__( 'Block for Apple Maps requires WordPress version 5.2 or greater.', 'maps-block-apple' ),
esc_html__( 'Block for Apple Maps requires WordPress version 5.8 or greater.', 'maps-block-apple' ),
esc_html__( 'Error Activating', 'maps-block-apple' )
);
}
Expand Down
Loading

0 comments on commit acece60

Please sign in to comment.