Skip to content

Commit

Permalink
Merge pull request #116 from wp-cli/fix/workflow-dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Aug 6, 2024
2 parents 31e3d71 + 4a40243 commit a3edcac
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Testing

on:
workflow_dispatch:
pull_request:
push:
branches:
Expand Down
39 changes: 21 additions & 18 deletions features/export.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Feature: Export content.
"""
And the return code should be 1

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export with post_type and post_status argument
Given a WP install

Expand Down Expand Up @@ -79,7 +79,7 @@ Feature: Export content.
10
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export a comma-separated list of post types
Given a WP install

Expand Down Expand Up @@ -132,7 +132,7 @@ Feature: Export content.
10
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export only one post
Given a WP install

Expand Down Expand Up @@ -204,7 +204,7 @@ Feature: Export content.
2
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export multiple posts, separated by spaces
Given a WP install

Expand Down Expand Up @@ -237,7 +237,7 @@ Feature: Export content.
2
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export multiple posts, separated by comma
Given a WP install

Expand Down Expand Up @@ -270,7 +270,7 @@ Feature: Export content.
2
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export posts within a given date range
Given a WP install

Expand Down Expand Up @@ -311,7 +311,7 @@ Feature: Export content.
10
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export posts from a given category
Given a WP install
And I run `wp site empty --yes`
Expand Down Expand Up @@ -393,7 +393,7 @@ Feature: Export content.
Apple Post
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export posts from a given author
Given a WP install
And I run `wp site empty --yes`
Expand Down Expand Up @@ -476,7 +476,7 @@ Feature: Export content.
[email protected]
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export posts should include user information
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
Expand All @@ -503,7 +503,7 @@ Feature: Export content.
Test User
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export posts from a given starting post ID
Given a WP install

Expand Down Expand Up @@ -542,7 +542,7 @@ Feature: Export content.
5
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Exclude a specific post type from export
Given a WP install
And I run `wp site empty --yes`
Expand Down Expand Up @@ -605,6 +605,7 @@ Feature: Export content.
0
"""

@require-mysql
Scenario: Export posts using --max_num_posts
Given a WP install
And I run `wp site empty --yes`
Expand Down Expand Up @@ -648,7 +649,7 @@ Feature: Export content.
000.xml
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export a site and skip the comments
Given a WP install
And I run `wp comment generate --post_id=1 --count=2`
Expand Down Expand Up @@ -787,6 +788,7 @@ Feature: Export content.
<wp:tag>
"""

@require-mysql
Scenario: Export without splitting the dump
Given a WP install
# Make export file > 15MB so will split by default. Need to split into 4 * 4MB to stay below 10% of default redo log size of 48MB, otherwise get MySQL error.
Expand Down Expand Up @@ -828,7 +830,7 @@ Feature: Export content.
"""
And STDERR should be empty

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export a site to stdout
Given a WP install
And I run `wp comment generate --post_id=1 --count=1`
Expand Down Expand Up @@ -882,7 +884,7 @@ Feature: Export content.
"""
And the return code should be 1

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export individual post with attachments
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
Expand Down Expand Up @@ -974,7 +976,7 @@ Feature: Export content.
white-150-square.jpg";s:
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export categories, tags and terms
Given a WP install
And a wp-content/mu-plugins/register-region-taxonomy.php file:
Expand Down Expand Up @@ -1139,7 +1141,7 @@ Feature: Export content.
Europe
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Export posts should not include oembed_cache posts user information
Given a WP install
And I run `wp plugin install wordpress-importer --activate`
Expand Down Expand Up @@ -1171,7 +1173,7 @@ Feature: Export content.
Test User
"""

@require-wp-5.2
@require-wp-5.2 @require-mysql
Scenario: Allow export to proceed when orphaned terms are found
Given a WP install
And I run `wp term create category orphan --parent=1`
Expand Down Expand Up @@ -1226,6 +1228,7 @@ Feature: Export content.
0
"""

@require-mysql
Scenario: Throw exception when orphaned terms are found
Given a WP install
And I run `wp term create category orphan --parent=1`
Expand All @@ -1235,4 +1238,4 @@ Feature: Export content.
Then STDERR should contain:
"""
Error: Term is missing a parent
"""
"""

0 comments on commit a3edcac

Please sign in to comment.