Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ETH Simple Shortlinks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WP Plugins
ETH Simple Shortlinks
Commits
b845b094
Commit
b845b094
authored
6 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Fuller test matrix
parent
d30d1d2e
Branches
master
No related tags found
1 merge request
!4
v0.6
Pipeline
#996
passed with warnings
6 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+50
-7
50 additions, 7 deletions
.gitlab-ci.yml
tests/test-plugin.php
+0
-23
0 additions, 23 deletions
tests/test-plugin.php
with
50 additions
and
30 deletions
.gitlab-ci.yml
+
50
−
7
View file @
b845b094
...
...
@@ -20,10 +20,45 @@ before_script:
composer global require "phpunit/phpunit=4.8.*"
fi
# Install PHPCS and WPCS
-
composer global require automattic/vipwpcs
-
composer global require phpcompatibility/phpcompatibility-wp
-
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/automattic/vipwpcs,$HOME/.composer/vendor/phpcompatibility/php-compatibility,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp
PHPunit:PHP5.3:MySQL
:
stage
:
test
image
:
containers.ethitter.com:443/docker/images/php:5.3
services
:
-
mysql:5.6
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
allow_failure
:
true
PHPunit:PHP5.6:MySQL
:
stage
:
test
image
:
containers.ethitter.com:443/docker/images/php:5.6
services
:
-
mysql:5.6
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
allow_failure
:
true
PHPunit:PHP7.0:MySQL
:
stage
:
test
image
:
containers.ethitter.com:443/docker/images/php:7.0
services
:
-
mysql:5.6
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
allow_failure
:
true
PHPunit:PHP7.1:MySQL
:
stage
:
test
image
:
containers.ethitter.com:443/docker/images/php:7.1
services
:
-
mysql:5.6
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpunit
allow_failure
:
true
PHPunit:PHP7.2:MySQL
:
stage
:
test
...
...
@@ -32,7 +67,6 @@ PHPunit:PHP7.2:MySQL:
-
mysql:5.6
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpcs -n
-
phpunit
allow_failure
:
true
...
...
@@ -43,13 +77,22 @@ PHPunit:PHP7.3:MySQL:
-
mysql:5.6
script
:
-
find . -type "f" -iname "*.php" | xargs -L "1" php -l
-
phpcs -n
-
phpunit
allow_failure
:
true
PHPCS
:
stage
:
test
image
:
containers.ethitter.com:443/docker/images/php:7.3
before_script
:
-
composer global require automattic/vipwpcs
-
composer global require phpcompatibility/phpcompatibility-wp
-
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs,$HOME/.composer/vendor/automattic/vipwpcs,$HOME/.composer/vendor/phpcompatibility/php-compatibility,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie,$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp
script
:
-
phpcs -n
PluginSVN
:
stage
:
deploy
image
:
containers.ethitter.com:443/docker/
images/php:7.3
image
:
containers.ethitter.com:443/docker/
wp-org-plugin-deploy:latest
before_script
:
-
curl -o ./bin/deploy.sh https://git-cdn.e15r.co/open-source/wp-org-plugin-deploy/raw/master/scripts/deploy.sh
-
chmod +x ./bin/deploy.sh
...
...
This diff is collapsed.
Click to expand it.
tests/test-plugin.php
+
0
−
23
View file @
b845b094
...
...
@@ -78,27 +78,4 @@ class PluginTest extends WP_UnitTestCase {
$this
->
assertNull
(
$redirect
,
'Failed to assert that redirect is not generated for unsupported post status.'
);
}
/**
* Indirect test of redirection.
*/
public
function
test_published_post_redirect_through_artifacts
():
void
{
add_filter
(
'eth_simple_shortlinks_verify_requested_post_support'
,
function
(
$verify
)
{
$this
->
assertEquals
(
static
::
$post_id_published
,
get_query_var
(
'p'
),
'Failed to assert that requested post ID matches ID of published post.'
);
return
$verify
;
}
);
add_filter
(
'eth_simple_shortlinks_redirect_url'
,
function
(
$url
)
{
$this
->
assertEquals
(
get_permalink
(
static
::
$post_id_published
),
$url
,
'Failed to assert that redirect URL is published post\'s permalink.'
);
return
$url
;
}
);
$this
->
go_to
(
wp_get_shortlink
(
static
::
$post_id_published
)
);
$this
->
assertQueryTrue
(
'is_404'
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment