Skip to content

Commit

Permalink
Deploy on published release (#508)
Browse files Browse the repository at this point in the history
* Add unit test for CPT term archive

* Beautify code

* Remove custom post type to simplify test

It doesn’t change the functionality to have a custom post type or not, so to simplify we’ll remove that from the test.

* Change cpt-tax-archive to cpt-archive

* Fix code comments

* Clarify the name of the custom taxonomy

* Update check for cpt and taxonomy archives

* Change test name

* functioning e2e framework

* hello world test

* package-lock (+@wordpress/e2e-test-utils)

* hook tests into CI

* limit to a single job

* Update npm to latest

* cache npm in setup-node

* switch to lts syntax for node-version

* some progress using docker compose

* more progress -- it's working!

* docker-compose vs docker compose

* trying to wait for wp

* working loop i hope

* bg docker-compose correctly

* tweak name & rm unused var

* rm the strategy and just code in node lts

* try npm ci

* README for e2e tests

* fixup watch runner name

* add option to reset wp db to init script

* update readme

* update e2e readme

* incraese timeout so tests pass in interactive mode

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* fixup watch script ws

* add details to the 'Run the tests' section

* Add step to node test to confirm the build is up-to-date

* demonstrate failure case when untracked file is present

* demonstrate failure case when change to src is not present in build

* remove failure -- this should pass

* Bump prettier from 2.3.2 to 2.4.1

Bumps [prettier](https://github.com/prettier/prettier) from 2.3.2 to 2.4.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.2...2.4.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Renaming alpha

* Bump @wordpress/scripts from 17.1.0 to 18.0.1

Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 17.1.0 to 18.0.1.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/scripts@18.0.1/packages/scripts)

---
updated-dependencies:
- dependency-name: "@wordpress/scripts"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Simplifying get_options function

* Tests: Improve the get_current_url data provider

Data providers actually provide an iterator rather than just an array, so we can build up the data using `yield` instead.

As per https://peakd.com/hive-168588/@crell/fun-with-phpunit-data-providers this has several advantages:

1. It's easier to read, making it better for future you to understand the code.
1. It's less indented, which gives you more room for longer lines for each value.
1. Because each test set is syntactically independent, it's easier to add new ones, reorder them, or temporarily comment out a single test set.
1. If a given test set needs more setup than just a static list, it's simple to put that setup before the `yield` statement for which it is relevant.

As per the follow-up article https://peakd.com/hive-168588/@crell/advanced-phpunit-shenanigans, I've also included a `@testdox` line on the test method. When this contains the method parameters, it completely overrides the sentence when the `--testdox` flag is called when running PHPUnit.

* Tests: Rename final *-test.php file to *Test.php

PSR-4 naming is needed for PHPUnit 9.1 support.

Fixes #379.

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Updating package-lock

* Removing ampersand

* Revert "Removing ampersand"

This reverts commit 228c2b72b6748c17c8f5d4fbed296bc159a768d7.

* Remove jQuery from recommended widget

* Using built code

* Forcing reset of e2e

* Change trigger

* Revert "Change trigger"

This reverts commit f61c2a3c36b6634706d0ab70d90db97d3489c8fd.

* Fix flaky test

* Updating package-lock

* Rollback tests changes

* Changing red color in admin to match wp-admin

* Remove unused default logo variable

* Using npm caching on GitHub Actions

* Integrations: Extract into separate classes

- Move AMP and Facebook Instant Article integrations into separate files.
- Improve and add tests that better check for the intended behaviour.

* Clarifying success message

* Updating built files

* Fixing syntax error

* Remove unused return_personalized_json function

* Hide admin warning on network admin

* Fix typo

* Integrations: Extract into separate classes

- Move AMP and Facebook Instant Article integrations into separate files.
- Improve and add tests that better check for the intended behaviour.

* Adding unit tests

* Fix linting issues

* Simplifying set_options on test

* Separating function for testing

* Update @covers annotation

* Simplifying logic

* Fix rendering errors with multiple widgets

* Fixing linting issues

* Fixing issue with sanitization

* Cleaning up logic

* Updating tests to be more reliable

* Separating subtests

* Tests: Improve get current URL tests

The focus of these tests is on the parsing issues related to the domain, port, and potential path, and this is represented in the data provider.

However, it's good to be able to confirm that going to the homepage, random URL and a post via it's ID, also work well for each of the combinations in the first parts of the URL.

* Adding 3.0 upgrade notice on README

* Encoding boolean values

* Fix linting issues

* Fix linting issues

* Small typo

* Fix linting issues

* Fix linting issues

* Split out plugin actions links logic

Moves the logic that adds the plugin action link to its own class.

Adds integration tests.

See #96.

* Tests: e2e for verifying the plugin action link

See #401.

* API Key: Add utility method for checking it is set

Also add utility method for checking if it is missing.

Includes unit tests.

Closes #395.

* API key: add utility method to retrieve key

Adds unit test.

* Testcase: Allow getMethod() to use different class

The existing method made the assumption that only non-public methods in the `Parsely` class would need to be made available for testing with Reflection.

This updates the method to allow methods in other classes to be reflected as well.

* Apply suggestions from code review

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Apply suggestions from code review

Clarify variable name.

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Adapting code to new project layout

* Using utility function to check for API keys

* Apply suggestions from code review

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Add admin warning for minimum requirements in 3.0 (#408)

* Adding admin upgrade warning

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Feature/improve test environment (#411)

* Tests: make future-compatible

- Use the snake_case fixture names
- Use wp-test-utils 1.0.0, and remove explicit PHPUnit constraints
- Refresh phpunit config file, including switching to TestDox output format

* CI: Use WP trunk with new test improvements

* CI: No need for pcov-clobber with PHPUnit 8.5

Also, don't ignore platform requirements for PHP 8, as we no longer need to force install PHPUnit 7.5 onto it.

* Bootstrap: Remove PHP_Token references

* Add coverage report back in

Not used yet, but without it, seems like no coverage check is actually done.

* CI: Add support for PHP 8.1 (allowed failures)

Also ensure `convertDeprecationsToExceptions` is true to better highlight PHP 8.1 native deprecation notices.

* Tests: split into unit and integration tests

See #179.

* Bootstrap: Move global code into a function

With all global code (other than some class file requires) in a function that is hooked in when WordPress runs, we can remove the `die`, which allows this file, with the defined constants and functions, to be included for unit tests.

* CI: Support running unit tests

* CI: Run unit tests on PHP 8 as well

* Tests: Define constants from plugin root file

* Tests: Fix CS

* Tests: Fix namespace

* Replace constants

* Various fixes

- Improve handling of no options being set.
- Fix CS
- Fix coverage annotations
- Fix wrong TestCase reference.

* Composer: Improve coverage scripts

Now with verbosity, which is useful in PHPUnit 9.5 to see why a test is classed as risky.

* CI: Add PHP 8.2

* CI: Fix indentation

* CI: Run coverage for integration tests

* CI: Always run coverage on multisite installs

* Re-fix Settings link on plugins page

* Tests: Re-add PluginActions test

Somehow got dropped from my branch when I rebased on to `develop`.

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Split out row action link logic (#406)

* Bring develop up to date with 2.6.0 (#415)

* Release 2.6.0 (#414)

* Hide the recommendation widget until the element is populated

* Update hidden classname per feedback

* Add conditional for cpt archives

Change to get queried object instead of category.

* Change conditional to is_archive

`is_archive()` is better in this case because it also targets taxonomy archives as well as custom post type archives.

* Add unit tests for CPT archive metadata

* Add unit test for CPT term archive

* Beautify code

* Remove custom post type to simplify test

It doesn’t change the functionality to have a custom post type or not, so to simplify we’ll remove that from the test.

* Change cpt-tax-archive to cpt-archive

* Fix code comments

* Clarify the name of the custom taxonomy

* Update check for cpt and taxonomy archives

* Change test name

* functioning e2e framework

* hello world test

* package-lock (+@wordpress/e2e-test-utils)

* hook tests into CI

* limit to a single job

* Update npm to latest

* cache npm in setup-node

* switch to lts syntax for node-version

* some progress using docker compose

* more progress -- it's working!

* docker-compose vs docker compose

* trying to wait for wp

* working loop i hope

* bg docker-compose correctly

* tweak name & rm unused var

* rm the strategy and just code in node lts

* try npm ci

* README for e2e tests

* fixup watch runner name

* add option to reset wp db to init script

* update readme

* update e2e readme

* incraese timeout so tests pass in interactive mode

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* fixup watch script ws

* add details to the 'Run the tests' section

* Add step to node test to confirm the build is up-to-date

* demonstrate failure case when untracked file is present

* demonstrate failure case when change to src is not present in build

* remove failure -- this should pass

* Bump prettier from 2.3.2 to 2.4.1

Bumps [prettier](https://github.com/prettier/prettier) from 2.3.2 to 2.4.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.2...2.4.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Renaming alpha

* Bump @wordpress/scripts from 17.1.0 to 18.0.1

Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 17.1.0 to 18.0.1.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/scripts@18.0.1/packages/scripts)

---
updated-dependencies:
- dependency-name: "@wordpress/scripts"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Simplifying get_options function

* Tests: Improve the get_current_url data provider

Data providers actually provide an iterator rather than just an array, so we can build up the data using `yield` instead.

As per https://peakd.com/hive-168588/@crell/fun-with-phpunit-data-providers this has several advantages:

1. It's easier to read, making it better for future you to understand the code.
1. It's less indented, which gives you more room for longer lines for each value.
1. Because each test set is syntactically independent, it's easier to add new ones, reorder them, or temporarily comment out a single test set.
1. If a given test set needs more setup than just a static list, it's simple to put that setup before the `yield` statement for which it is relevant.

As per the follow-up article https://peakd.com/hive-168588/@crell/advanced-phpunit-shenanigans, I've also included a `@testdox` line on the test method. When this contains the method parameters, it completely overrides the sentence when the `--testdox` flag is called when running PHPUnit.

* Tests: Rename final *-test.php file to *Test.php

PSR-4 naming is needed for PHPUnit 9.1 support.

Fixes #379.

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Updating package-lock

* Removing ampersand

* Revert "Removing ampersand"

This reverts commit 228c2b72b6748c17c8f5d4fbed296bc159a768d7.

* Remove jQuery from recommended widget

* Using built code

* Forcing reset of e2e

* Change trigger

* Revert "Change trigger"

This reverts commit f61c2a3c36b6634706d0ab70d90db97d3489c8fd.

* Fix flaky test

* Updating package-lock

* Rollback tests changes

* Changing red color in admin to match wp-admin

* Remove unused default logo variable

* Using npm caching on GitHub Actions

* Integrations: Extract into separate classes

- Move AMP and Facebook Instant Article integrations into separate files.
- Improve and add tests that better check for the intended behaviour.

* Clarifying success message

* Updating built files

* Fixing syntax error

* Remove unused return_personalized_json function

* Hide admin warning on network admin

* Fix typo

* Integrations: Extract into separate classes

- Move AMP and Facebook Instant Article integrations into separate files.
- Improve and add tests that better check for the intended behaviour.

* Adding unit tests

* Fix linting issues

* Simplifying set_options on test

* Separating function for testing

* Update @covers annotation

* Simplifying logic

* Fix rendering errors with multiple widgets

* Fixing linting issues

* Fixing issue with sanitization

* Cleaning up logic

* Updating tests to be more reliable

* Separating subtests

* Tests: Improve get current URL tests

The focus of these tests is on the parsing issues related to the domain, port, and potential path, and this is represented in the data provider.

However, it's good to be able to confirm that going to the homepage, random URL and a post via it's ID, also work well for each of the combinations in the first parts of the URL.

* Adding 3.0 upgrade notice on README

* Encoding boolean values

* Fix linting issues

* Fix linting issues

* Small typo

* Fix linting issues

* Fix linting issues

* Split out plugin actions links logic

Moves the logic that adds the plugin action link to its own class.

Adds integration tests.

See #96.

* Tests: e2e for verifying the plugin action link

See #401.

* API Key: Add utility method for checking it is set

Also add utility method for checking if it is missing.

Includes unit tests.

Closes #395.

* API key: add utility method to retrieve key

Adds unit test.

* Testcase: Allow getMethod() to use different class

The existing method made the assumption that only non-public methods in the `Parsely` class would need to be made available for testing with Reflection.

This updates the method to allow methods in other classes to be reflected as well.

* Apply suggestions from code review

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Apply suggestions from code review

Clarify variable name.

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Adapting code to new project layout

* Using utility function to check for API keys

* Apply suggestions from code review

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Add admin warning for minimum requirements in 3.0 (#408)

* Adding admin upgrade warning

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Feature/improve test environment (#411)

* Tests: make future-compatible

- Use the snake_case fixture names
- Use wp-test-utils 1.0.0, and remove explicit PHPUnit constraints
- Refresh phpunit config file, including switching to TestDox output format

* CI: Use WP trunk with new test improvements

* CI: No need for pcov-clobber with PHPUnit 8.5

Also, don't ignore platform requirements for PHP 8, as we no longer need to force install PHPUnit 7.5 onto it.

* Bootstrap: Remove PHP_Token references

* Add coverage report back in

Not used yet, but without it, seems like no coverage check is actually done.

* CI: Add support for PHP 8.1 (allowed failures)

Also ensure `convertDeprecationsToExceptions` is true to better highlight PHP 8.1 native deprecation notices.

* Tests: split into unit and integration tests

See #179.

* Bootstrap: Move global code into a function

With all global code (other than some class file requires) in a function that is hooked in when WordPress runs, we can remove the `die`, which allows this file, with the defined constants and functions, to be included for unit tests.

* CI: Support running unit tests

* CI: Run unit tests on PHP 8 as well

* Tests: Define constants from plugin root file

* Tests: Fix CS

* Tests: Fix namespace

* Replace constants

* Various fixes

- Improve handling of no options being set.
- Fix CS
- Fix coverage annotations
- Fix wrong TestCase reference.

* Composer: Improve coverage scripts

Now with verbosity, which is useful in PHPUnit 9.5 to see why a test is classed as risky.

* CI: Add PHP 8.2

* CI: Fix indentation

* CI: Run coverage for integration tests

* CI: Always run coverage on multisite installs

* Re-fix Settings link on plugins page

* Tests: Re-add PluginActions test

Somehow got dropped from my branch when I rebased on to `develop`.

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Split out row action link logic (#406)

* Bumping version numbers

* Add changelog

* Update CHANGELOG.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Moving deprecated notes from changelog

Co-authored-by: Jeff Bowen <jblz@users.noreply.github.com>
Co-authored-by: mikeyarce <mikeyarce@gmail.com>
Co-authored-by: Gary Jones <gary.jones@automattic.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gary Jones <gary@gamajo.com>

* Bumping version number

Co-authored-by: Jeff Bowen <jblz@users.noreply.github.com>
Co-authored-by: mikeyarce <mikeyarce@gmail.com>
Co-authored-by: Gary Jones <gary.jones@automattic.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gary Jones <gary@gamajo.com>

* Increase minimum PHP and WP versions

See #390.

* CI: Specify coverage: none where it is not needed

See #418.

* Declare strict_types=1

On it's own this doesn't do much, but when more type definitions are added, particularly scalar types, then PHP will handle the types without juggling them.

For choice of positioning below the file-level DocBlock, see https://www.php-fig.org/psr/psr-12/.
For lack of spaces inside the parentheses and around the `=`, see https://make.wordpress.org/core/2020/03/20/updating-the-coding-standards-for-modern-php/

See #389.

* Fix PHP 8+ TypeError for getting current URL

> TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, bool given

This originates when no `$post_id` is passed to the `get_current_url()` method, and no Post ID can be determined from the global `$post`.

As `get_permalink()` can return `false`, then casting it to a string means it will have a value of an empty string.

* Docs: Add contributor note about strong typing

* Remove post_has_viewable_type (#417)

* Using PHP 7 null coalescing operator (#421)

* Using PHP 7 null coalescing operator

* Fixing linter

* Revert "Add admin warning for minimum requirements in 3.0 (#408)" (#424)

* Revert "Add admin warning for minimum requirements in 3.0 (#408)"

This reverts commit 79742d5b39470fb9dd4267eacdf34b41fb2ff8b9.

* Fix identation

* Add return type declarations (#429)

* Add return types for Parsely class

* Add return types to test methods

* Add return types to remaining files

* Nested dirname calls can be replaced

Second argument supported since PHP 7.0.

* Declare visibility for class-level constants

Makes them all explicitly `public`, but some of these could be made less visible.

See #428.

* Convert documented param type to short form

* Fix discrepancy of class name and its use

* Replace full qualified name with an import

* Inline one-time use variables

* Add return type declarations

* Remove incorrect return type declaration

* Fix typos and unnecessary abbreviations

* Remove unnecessary regular expression escaping

* Regexp: Use character class

More performant than single character alternation.

* Use const syntax instead of define()

* Fix CS alignments

* Tests: Stop using deprecated setMethods method (#427)

* Tests: Stop using deprecated setMethods method

Use `onlyMethods()` instead, which ensures that the method that is being mocked does exist in the class being mocked.

* Tests: use onlyMethods() only if it exists

* Displaying Open on Parse.ly links by default (#433)

* Displaying Open on Parse.ly links by default

* Empty

* Remove deprecated filter after_set_parsely_page (#436)

* Remove deprecated filter after_set_parsely_page

* Updating tests

* Remove deprecated filter parsely_filter_insert_javascript (#437)

* Remove deprecated filter parsely_filter_insert_javascript

* Removing deprecated test

* Fixing some code smells (#435)

* Fixing code smells

* Removing duplicate

* Fix linting issues

* Adding E2E test to check for available recommended widget (#434)

* Adding E2E test to check for available recommended widget

* Adding utils

* Documenting utils and separating logical behavior

* Adding missing await

* Extracting more logic into constants

* Fix not working readme code sample (#439)

* Update defaults in `get_bottom_level_term` to empty array to prevent warnings downstream (#438)

* Update class-parsely.php

Change default from null to empty array to prevent warnings thrown by array_diff on line 1650

* Update src/class-parsely.php

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Removing old init script (#441)

* Add wp_parsely_should_insert_metadata filter (#440)

* Add wp_parsely_should_insert_metadata filter

* Revert return change

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Adding uninstall script (#444)

* Adding uninstall script

* Addressing linting issues

* Bump @wordpress/e2e-test-utils from 5.4.3 to 5.4.4 (#449)

Bumps [@wordpress/e2e-test-utils](https://github.com/WordPress/gutenberg/tree/HEAD/packages/e2e-test-utils) from 5.4.3 to 5.4.4.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/e2e-test-utils/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/e2e-test-utils@5.4.4/packages/e2e-test-utils)

---
updated-dependencies:
- dependency-name: "@wordpress/e2e-test-utils"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @wordpress/scripts from 18.0.1 to 18.1.0 (#450)

Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 18.0.1 to 18.1.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/scripts@18.1.0/packages/scripts)

---
updated-dependencies:
- dependency-name: "@wordpress/scripts"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Constant return type on insert_parsely_page (#443)

* Constant return type on insert_parsely_page

* Adding deprecation warning for method

* Fix linting issues

* Fixing backwards compat return

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Fixing return types of update_metadata_endpoint (#446)

* Fixing return types of update_metadata_endpoint

* Fix identation

* Change get_current_url default type to non-post (#447)

* Change to non-post default

* Fix linting issues

* Adding docstring to document parameter change

* Create codeql-analysis.yml (#453)

See https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning

* Add namespaces to files (#430)

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Bring develop up to date with 2.6.1 (#454)

* Release 2.6.0 (#414)

* Hide the recommendation widget until the element is populated

* Update hidden classname per feedback

* Add conditional for cpt archives

Change to get queried object instead of category.

* Change conditional to is_archive

`is_archive()` is better in this case because it also targets taxonomy archives as well as custom post type archives.

* Add unit tests for CPT archive metadata

* Add unit test for CPT term archive

* Beautify code

* Remove custom post type to simplify test

It doesn’t change the functionality to have a custom post type or not, so to simplify we’ll remove that from the test.

* Change cpt-tax-archive to cpt-archive

* Fix code comments

* Clarify the name of the custom taxonomy

* Update check for cpt and taxonomy archives

* Change test name

* functioning e2e framework

* hello world test

* package-lock (+@wordpress/e2e-test-utils)

* hook tests into CI

* limit to a single job

* Update npm to latest

* cache npm in setup-node

* switch to lts syntax for node-version

* some progress using docker compose

* more progress -- it's working!

* docker-compose vs docker compose

* trying to wait for wp

* working loop i hope

* bg docker-compose correctly

* tweak name & rm unused var

* rm the strategy and just code in node lts

* try npm ci

* README for e2e tests

* fixup watch runner name

* add option to reset wp db to init script

* update readme

* update e2e readme

* incraese timeout so tests pass in interactive mode

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* fixup watch script ws

* add details to the 'Run the tests' section

* Add step to node test to confirm the build is up-to-date

* demonstrate failure case when untracked file is present

* demonstrate failure case when change to src is not present in build

* remove failure -- this should pass

* Bump prettier from 2.3.2 to 2.4.1

Bumps [prettier](https://github.com/prettier/prettier) from 2.3.2 to 2.4.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.2...2.4.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Renaming alpha

* Bump @wordpress/scripts from 17.1.0 to 18.0.1

Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 17.1.0 to 18.0.1.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/scripts@18.0.1/packages/scripts)

---
updated-dependencies:
- dependency-name: "@wordpress/scripts"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Simplifying get_options function

* Tests: Improve the get_current_url data provider

Data providers actually provide an iterator rather than just an array, so we can build up the data using `yield` instead.

As per https://peakd.com/hive-168588/@crell/fun-with-phpunit-data-providers this has several advantages:

1. It's easier to read, making it better for future you to understand the code.
1. It's less indented, which gives you more room for longer lines for each value.
1. Because each test set is syntactically independent, it's easier to add new ones, reorder them, or temporarily comment out a single test set.
1. If a given test set needs more setup than just a static list, it's simple to put that setup before the `yield` statement for which it is relevant.

As per the follow-up article https://peakd.com/hive-168588/@crell/advanced-phpunit-shenanigans, I've also included a `@testdox` line on the test method. When this contains the method parameters, it completely overrides the sentence when the `--testdox` flag is called when running PHPUnit.

* Tests: Rename final *-test.php file to *Test.php

PSR-4 naming is needed for PHPUnit 9.1 support.

Fixes #379.

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/e2e/README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Updating package-lock

* Removing ampersand

* Revert "Removing ampersand"

This reverts commit 228c2b72b6748c17c8f5d4fbed296bc159a768d7.

* Remove jQuery from recommended widget

* Using built code

* Forcing reset of e2e

* Change trigger

* Revert "Change trigger"

This reverts commit f61c2a3c36b6634706d0ab70d90db97d3489c8fd.

* Fix flaky test

* Updating package-lock

* Rollback tests changes

* Changing red color in admin to match wp-admin

* Remove unused default logo variable

* Using npm caching on GitHub Actions

* Integrations: Extract into separate classes

- Move AMP and Facebook Instant Article integrations into separate files.
- Improve and add tests that better check for the intended behaviour.

* Clarifying success message

* Updating built files

* Fixing syntax error

* Remove unused return_personalized_json function

* Hide admin warning on network admin

* Fix typo

* Integrations: Extract into separate classes

- Move AMP and Facebook Instant Article integrations into separate files.
- Improve and add tests that better check for the intended behaviour.

* Adding unit tests

* Fix linting issues

* Simplifying set_options on test

* Separating function for testing

* Update @covers annotation

* Simplifying logic

* Fix rendering errors with multiple widgets

* Fixing linting issues

* Fixing issue with sanitization

* Cleaning up logic

* Updating tests to be more reliable

* Separating subtests

* Tests: Improve get current URL tests

The focus of these tests is on the parsing issues related to the domain, port, and potential path, and this is represented in the data provider.

However, it's good to be able to confirm that going to the homepage, random URL and a post via it's ID, also work well for each of the combinations in the first parts of the URL.

* Adding 3.0 upgrade notice on README

* Encoding boolean values

* Fix linting issues

* Fix linting issues

* Small typo

* Fix linting issues

* Fix linting issues

* Split out plugin actions links logic

Moves the logic that adds the plugin action link to its own class.

Adds integration tests.

See #96.

* Tests: e2e for verifying the plugin action link

See #401.

* API Key: Add utility method for checking it is set

Also add utility method for checking if it is missing.

Includes unit tests.

Closes #395.

* API key: add utility method to retrieve key

Adds unit test.

* Testcase: Allow getMethod() to use different class

The existing method made the assumption that only non-public methods in the `Parsely` class would need to be made available for testing with Reflection.

This updates the method to allow methods in other classes to be reflected as well.

* Apply suggestions from code review

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Apply suggestions from code review

Clarify variable name.

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Adapting code to new project layout

* Using utility function to check for API keys

* Apply suggestions from code review

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Add admin warning for minimum requirements in 3.0 (#408)

* Adding admin upgrade warning

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Feature/improve test environment (#411)

* Tests: make future-compatible

- Use the snake_case fixture names
- Use wp-test-utils 1.0.0, and remove explicit PHPUnit constraints
- Refresh phpunit config file, including switching to TestDox output format

* CI: Use WP trunk with new test improvements

* CI: No need for pcov-clobber with PHPUnit 8.5

Also, don't ignore platform requirements for PHP 8, as we no longer need to force install PHPUnit 7.5 onto it.

* Bootstrap: Remove PHP_Token references

* Add coverage report back in

Not used yet, but without it, seems like no coverage check is actually done.

* CI: Add support for PHP 8.1 (allowed failures)

Also ensure `convertDeprecationsToExceptions` is true to better highlight PHP 8.1 native deprecation notices.

* Tests: split into unit and integration tests

See #179.

* Bootstrap: Move global code into a function

With all global code (other than some class file requires) in a function that is hooked in when WordPress runs, we can remove the `die`, which allows this file, with the defined constants and functions, to be included for unit tests.

* CI: Support running unit tests

* CI: Run unit tests on PHP 8 as well

* Tests: Define constants from plugin root file

* Tests: Fix CS

* Tests: Fix namespace

* Replace constants

* Various fixes

- Improve handling of no options being set.
- Fix CS
- Fix coverage annotations
- Fix wrong TestCase reference.

* Composer: Improve coverage scripts

Now with verbosity, which is useful in PHPUnit 9.5 to see why a test is classed as risky.

* CI: Add PHP 8.2

* CI: Fix indentation

* CI: Run coverage for integration tests

* CI: Always run coverage on multisite installs

* Re-fix Settings link on plugins page

* Tests: Re-add PluginActions test

Somehow got dropped from my branch when I rebased on to `develop`.

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Split out row action link logic (#406)

* Bumping version numbers

* Add changelog

* Update CHANGELOG.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Moving deprecated notes from changelog

Co-authored-by: Jeff Bowen <jblz@users.noreply.github.com>
Co-authored-by: mikeyarce <mikeyarce@gmail.com>
Co-authored-by: Gary Jones <gary.jones@automattic.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gary Jones <gary@gamajo.com>

* Fix recommended widget not following configuration (#451)

* Fix recommended widget not following configuration

* Remove unwanted console log

* Release 2.6.1 (#452)

* Preparing for 2.6.1 release

* Update CHANGELOG.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Reverting test changes

* Reverting more changes

* Updating asset

Co-authored-by: Jeff Bowen <jblz@users.noreply.github.com>
Co-authored-by: mikeyarce <mikeyarce@gmail.com>
Co-authored-by: Gary Jones <gary.jones@automattic.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gary Jones <gary@gamajo.com>

* Removing empty functions (#456)

* Enqueue scripts with theme independent hook (#458)

* Move Parse.ly settings to views folder (#459)

* Move Parse.ly settings to views folder

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Removing Parse.ly load text domain (#457)

* i18n: Fix JS string translation

* Adding argument types to functions (#455)

* Adding argument types to functions

* Making tests pass

* Fix linting issues

* Adding types to tests

* Fix type issues

* Addressing PR feedback

* Addressing tests

* Updating more tests

* Fixing final test

* Removing additional comment lines

* Revert OtherTest

* Revert "Revert OtherTest"

This reverts commit 5b8607a010c23e98a8e15676cf82a6724412dd9c.

* Reverting test changes and adding more defensive code on authors

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Adding translation support for Yes and No fields (#463)

* Adding translation support for Yes and No fields

* Fix linting issues

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Adding labels to admin settings form (#464)

* Adding labels to admin settings form

* Fixing identation

* Bump @wordpress/e2e-test-utils from 5.4.4 to 5.4.5 (#466)

Bumps [@wordpress/e2e-test-utils](https://github.com/WordPress/gutenberg/tree/HEAD/packages/e2e-test-utils) from 5.4.4 to 5.4.5.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/e2e-test-utils/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/e2e-test-utils@5.4.5/packages/e2e-test-utils)

---
updated-dependencies:
- dependency-name: "@wordpress/e2e-test-utils"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @wordpress/scripts from 18.1.0 to 19.0.0 (#465)

* Bump @wordpress/scripts from 18.1.0 to 19.0.0

Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 18.1.0 to 19.0.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/scripts@19.0.0/packages/scripts)

---
updated-dependencies:
- dependency-name: "@wordpress/scripts"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updating built files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>
Co-authored-by: Pau Argelaguet <pau@outlook.com>

* Removing code coverage annotations (#469)

* Removing upgrade README notice (#470)

* Extract settings page from Parsely class (#467)

* Moving settings page out of class-parsely

* Move print dynamic tracking note

* Fixing hooks

* Fix automated linting issues

* Fix manual linting issues

* Updating hook to _admin_menu

* Fix type errors (#474)

* Fix type error get_api_url

* Fixing various type errors

* Fix linting issues

* Adding namespace to Recommended Widget (#475)

* Fix type error get_api_url

* Fixing various type errors

* Fix linting issues

* Adding missing namespaces

* Namespacing recommended widget

* Using proper namespace on tests

* Adding filter to display Cloudflare links (#473)

* Adding filter to display CloudFlare links

* Adding test for filter

* Updating failing test

* Fix multisite test

* Updating readme

* Update README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update src/class-parsely.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Updating filter docs

* Removing redundant test assertions

* Changing name of the filter

* Update README.md

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Avoid making duplicate calls on Recommended Widget (#460)

* Avoid making duplicate calls on Recommended Widget

* Refactoring constructUrl

* Fixing parsing issues of updated values

* Adding e2e tests

* Adding type fixes

* Improving type fixes

* Revert optional post

* Extract admin warning from class-parsely (#468)

* Moving settings page out of class-parsely

* Move print dynamic tracking note

* Fixing hooks

* Fix automated linting issues

* Fix manual linting issues

* Extracting admin warning

* Updating hook to _admin_menu

* Moving admin warning tests

* Fix get method

* e2e tests: fix watch command (#476)

* e2e tests: fix watch command

Previously it would error as `test-e2e` command didn't exist.

* Update package.json

* Adding e2e interactive command

* Fix padding

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>
Co-authored-by: Pau Argelaguet <pau@outlook.com>

* Adding namespace to root class (#477)

* Starting namespace add

* Adding namespace to root class

* Working on tests

* Working on UI tests

* Address StructuredData tests

* Explicit WP_User import

* Fix linting issues

* Using fully qualified names on docstrings in StructuredData tests

* Correcting more docstrings

* Fixing warnings on UI tests

* Fix get_options

* Removing warnings on AdminWarningTest

* Fix FBIA tests

* Fix Integrations Test

* Update tests/Integration/Integrations/AmpTest.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/Integration/Integrations/AmpTest.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/Integration/Integrations/AmpTest.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/Integration/Integrations/AmpTest.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Update tests/Integration/Integrations/AmpTest.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Bump @wordpress/scripts from 19.0.0 to 19.1.0 (#480)

Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 19.0.0 to 19.1.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/@wordpress/scripts@19.1.0/packages/scripts/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/scripts@19.1.0/packages/scripts)

---
updated-dependencies:
- dependency-name: "@wordpress/scripts"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @wordpress/e2e-test-utils from 5.4.5 to 5.4.6 (#479)

Bumps [@wordpress/e2e-test-utils](https://github.com/WordPress/gutenberg/tree/HEAD/packages/e2e-test-utils) from 5.4.5 to 5.4.6.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/@wordpress/e2e-test-utils@5.4.6/packages/e2e-test-utils/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/e2e-test-utils@5.4.6/packages/e2e-test-utils)

---
updated-dependencies:
- dependency-name: "@wordpress/e2e-test-utils"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Bump @wordpress/e2e-test-utils from 5.4.6 to 5.4.7 (#488)

Bumps [@wordpress/e2e-test-utils](https://github.com/WordPress/gutenberg/tree/HEAD/packages/e2e-test-utils) from 5.4.6 to 5.4.7.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/e2e-test-utils/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/e2e-test-utils@5.4.7/packages/e2e-test-utils)

---
updated-dependencies:
- dependency-name: "@wordpress/e2e-test-utils"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use checkboxes for multiple selects in settings page (#482)

* Moving settings page out of class-parsely

* Move print dynamic tracking note

* Fixing hooks

* Fix automated linting issues

* Fix manual linting issues

* Updating hook to _admin_menu

* Working on settings select

* Formatting data correctly

* Rollback new line

* Reverting label change

* Fix automated linting issues

* Fix linting issues

* Simplifying select

* Removing references to multiple argument

* Displaying public taxonomies only

* Matching id and label of checkbox

* Move tracker logic to separate file (#478)

* Starting namespace add

* Adding namespace to root class

* Working on tests

* Working on UI tests

* Address StructuredData tests

* Explicit WP_User import

* Fix linting issues

* Using fully qualified names on docstrings in StructuredData tests

* Correcting more docstrings

* Fixing warnings on UI tests

* Fix get_options

* Removing warnings on AdminWarningTest

* Fix FBIA tests

* Fix Integrations Test

* Splitting out tracker code

* Adding tracker test

* Adding additional tests

* Keep moving tests

* Moving constant

* Adding WP_Scripts

* Renaming class to scripts

* Fixing scripts naming

* Fix path

* Making sure script enqueue is clean

* Fix linting issues

* Updating comment

* Updating more comments

* Bump @wordpress/eslint-plugin from 9.2.0 to 9.3.0 (#490)

Bumps [@wordpress/eslint-plugin](https://github.com/WordPress/gutenberg/tree/HEAD/packages/eslint-plugin) from 9.2.0 to 9.3.0.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/eslint-plugin@9.3.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@wordpress/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @wordpress/e2e-test-utils from 5.4.7 to 5.4.8 (#492)

Bumps [@wordpress/e2e-test-utils](https://github.com/WordPress/gutenberg/tree/HEAD/packages/e2e-test-utils) from 5.4.7 to 5.4.8.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/e2e-test-utils/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/e2e-test-utils@5.4.8/packages/e2e-test-utils)

---
updated-dependencies:
- dependency-name: "@wordpress/e2e-test-utils"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @wordpress/scripts from 19.1.0 to 19.2.1 (#491)

Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 19.1.0 to 19.2.1.
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/scripts@19.2.1/packages/scripts)

---
updated-dependencies:
- dependency-name: "@wordpress/scripts"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Renaming functions on Scripts class (#481)

* Starting namespace add

* Adding namespace to root class

* Working on tests

* Working on UI tests

* Address StructuredData tests

* Explicit WP_User import

* Fix linting issues

* Using fully qualified names on docstrings in StructuredData tests

* Correcting more docstrings

* Fixing warnings on UI tests

* Fix get_options

* Removing warnings on AdminWarningTest

* Fix FBIA tests

* Fix Integrations Test

* Splitting out tracker code

* Adding tracker test

* Adding additional tests

* Keep moving tests

* Moving constant

* Adding WP_Scripts

* Fixing small issues with scripts class

* Renaming class to scripts

* Fixing scripts naming

* Fix path

* Renaming functions on tests

* Adding a cannonical way of running the plugin locally (#493)

* Adding a local dev environment

* Adding link to VIP dev-env

* Fix tabs on package.json

* Making class members private (#486)

* Making class members private

* Fix FBIA tests

* Fix Recommended API tests

* Revert AMP changes

* Using reflection in tests

* Test with hardcoded constant

* Fix test

* Update tests/Integration/Integrations/FacebookInstantArticlesTest.php

Co-authored-by: Gary Jones <gary.jones@automattic.com>

Co-authored-by: Gary Jones <gary.jones@automattic.com>

* Adding changelog for 3.0.0 (#495)

* Adding Changelog for 3.0

* Finishing up changelog

* Remove unnecessary npm step in e2e (#494)

* Shorter timeout for tests

* Not updating npm each time

* Shorter timeout

* Reverting changes on tests

* Removing custom jest

* Optimizing tests

* Removing explicit timeouts

* Only running NodeJS checks with latest version (#499)

* Checking for updates in GitHub Actions (#498)

* Merging trunk to develop. (#505)

Co-authored-by: Volodymyr Kolesnykov <sjinks@users.noreply.github.com>

* Changelog: Add more detail for 3.0 release (#506)

* Changelog: Add more detail for 3.0 release

* Update CHANGELOG.md

Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>

* Deploy on published release

As per https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#release, the workflow will only fire when we publish a release on GitHub. The `released` type will only fire for stable releases,  and not pre-release releases. 

This allows tagging and release of alpha and beta versions, without it automatically pushing to WPORG SVN which then result in sites pulling those in via plugin auto-updates.

Co-authored-by: mikeyarce <mikeyarce@gmail.com>
Co-authored-by: Jeff Bowen <jblz@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pau Argelaguet <pau@outlook.com>
Co-authored-by: Pau Argelaguet <pauarge@users.noreply.github.com>
Co-authored-by: Michael Chan <michael.chan@automattic.com>
Co-authored-by: Volodymyr Kolesnykov <sjinks@users.noreply.github.com>
  • Loading branch information
8 people committed Nov 25, 2021
1 parent 5b1ee69 commit bb80bec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Deploy to WordPress.org
on:
push:
tags:
- "*"
release:
types: [released]
jobs:
tag:
name: New tag
Expand Down

0 comments on commit bb80bec

Please sign in to comment.