Skip to content

Commit bad54e9

Browse files
Run Behat tests on CI with bin/test.sh
1 parent 05c0883 commit bad54e9

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ before_script:
4646
- composer validate
4747

4848
script:
49-
- behat --format progress --strict
49+
- bash bin/test.sh

bin/test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
# Run the functional tests
6+
BEHAT_TAGS=$(php utils/behat-tags.php)
7+
behat --format progress $BEHAT_TAGS --strict

circle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ test:
2424
pre:
2525
- composer validate
2626
override:
27-
- WP_VERSION=latest behat --format progress --strict
27+
- WP_VERSION=latest bash bin/test.sh
2828
- rm -rf '/tmp/wp-cli-test core-download-cache'
29-
- WP_VERSION=trunk behat --format progress --strict
29+
- WP_VERSION=trunk bash bin/test.sh

features/scaffold-package-tests.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Feature: Scaffold the test suite for an existing package
3434
Then STDOUT should not be empty
3535
And the community-command/.travis.yml file should exist
3636
And the community-command/bin/install-package-tests.sh file should exist
37+
And the community-command/bin/test.sh file should exist
3738
And the community-command/utils/behat-tags.php file should contain:
3839
"""
3940
require-wp
@@ -84,6 +85,10 @@ Feature: Scaffold the test suite for an existing package
8485
"""
8586
bash bin/install-package-tests.sh
8687
"""
88+
And the community-command/.travis.yml file should contain:
89+
"""
90+
bash bin/test.sh
91+
"""
8792
And the community-command/circle.yml file should not exist
8893

8994
Scenario: Scaffolds .travis.yml configuration file with argument
@@ -94,4 +99,8 @@ Feature: Scaffold the test suite for an existing package
9499
"""
95100
bash bin/install-package-tests.sh
96101
"""
102+
And the community-command/circle.yml file should contain:
103+
"""
104+
bash bin/test.sh
105+
"""
97106
And the community-command/.travis.yml file should not exist

0 commit comments

Comments
 (0)