Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add acceptance tests #84

Merged
merged 40 commits into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b58a231
Set up WP Acceptance
Mar 5, 2020
e0ec75f
Add initial tests for classic editor
Mar 7, 2020
8b3a6e2
Add wp acceptance config
Mar 8, 2020
a93db41
Add tests
Mar 8, 2020
b8b64d5
Disable publishing while saving autoshare settings
Mar 8, 2020
3b6c85a
Add wp acceptance to test workflow
Mar 8, 2020
4f2e65d
Fix workflow variables
Mar 8, 2020
99d58a1
Use wp_rand instead of rand
Mar 8, 2020
8f69ef4
Switch back to rand
Mar 8, 2020
582b9d3
Add username toWP acceptance AWS setup command
Mar 10, 2020
98ec721
Set wpsnapshots directory
Mar 10, 2020
fafe351
Pass secrets as env variables
Mar 10, 2020
f9aff4c
Use format function for snapshots dir env variable
Mar 10, 2020
f14e9dd
Try to fix syntax
Mar 10, 2020
7553eca
Try different syntax
Mar 10, 2020
9418a46
Pass snapshots dir in command
Mar 10, 2020
82986f1
Try to fix empty GITHUB_WORKSPACE
Mar 10, 2020
6647295
Test
Mar 10, 2020
1ae1496
Test
Mar 10, 2020
4cba862
Update snapshot id?
Mar 10, 2020
af275ee
Test on PHP 7.3
Mar 11, 2020
42adee3
Used forked repo with fix
Mar 11, 2020
9679e7c
Update tests
Mar 11, 2020
589da3e
Add before_scripts
Mar 11, 2020
57cc398
Add usleeps
Mar 11, 2020
ccc03af
Replace usleep with waitUntilNavigation
Mar 11, 2020
a19db98
Update WP Acceptance
Mar 13, 2020
db4aa92
Test PHP 7.2
Mar 13, 2020
bf5aac0
Action: add sql service
Mar 13, 2020
14bdece
Test
Mar 13, 2020
80e7770
Update mysql service
Mar 13, 2020
906723e
Add mysql port
Mar 13, 2020
8892c94
Add mysql env
Mar 13, 2020
4697125
Test
Mar 13, 2020
5bd5496
Restore to previous state
Mar 13, 2020
8f48bdc
Test
Mar 13, 2020
b8af9c2
Update .github/workflows/test.yml
johnwatkins0 Mar 13, 2020
79dda78
Update .github/workflows/test.yml
johnwatkins0 Mar 13, 2020
2c0708e
Update composer.json
johnwatkins0 Mar 13, 2020
7aee469
Test in 7.2
johnwatkins0 Mar 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,27 @@ jobs:
uses: icrawl/action-eslint@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

with:
job-name: eslint

test_php:
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:10.4
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10
strategy:
matrix:
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3']

steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Install dependencies
run: composer install
- name: Run PHPCS
Expand All @@ -42,3 +51,8 @@ jobs:
run: |
composer run setup-local-tests
composer test
- name: Run WP Acceptance
if: matrix.php-versions == '7.3'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we run tests on 7.2 too?

run: |
WP_SNAPSHOTS_DIR=${{ github.workspace }}/.wpsnapshots/ ./vendor/bin/wpsnapshots configure --aws_key=${{ secrets.AWS_ACCESS_KEY }} --aws_secret=${{ secrets.SECRET_ACCESS_KEY }} --user_name="wp-acceptance" [email protected] 10up
./vendor/bin/wpacceptance run
10 changes: 7 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@
}
],
"require": {
"php": ">=7.2",
"abraham/twitteroauth": "^0.7.4"
},
"require-dev": {
"phpunit/phpunit": "^7",
"phpunit/phpunit": "^7.5",
"wp-coding-standards/wpcs": "^2.2",
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0"
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"10up/wpacceptance": "dev-master"
},
"scripts": {
"test": "phpunit",
"setup-local-tests": "bash bin/install-wp-tests.sh wordpress_test root root localhost latest",
johnwatkins0 marked this conversation as resolved.
Show resolved Hide resolved
"test:acceptance": "wpacceptance run",
"lint": "./vendor/bin/phpcs --extensions=php -s .",
"lint-fix": "./vendor/bin/phpcbf --extensions=php ."
}
},
"minimum-stability": "dev"
}
Loading