-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from 10up/feature/add-cypress-tests
Add cypress tests
- Loading branch information
Showing
29 changed files
with
2,574 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,3 @@ phpunit.xml | |
README.md | ||
webpack.config.js | ||
webpack.gutenberg.config.js | ||
wpacceptance.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ assets | |
dist | ||
node_modules | ||
vendor | ||
tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: E2E Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
cypress: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
core: | ||
- { name: 'WP latest', version: 'latest' } | ||
- { name: 'WP trunk', version: 'WordPress/WordPress#master' } | ||
- { name: 'WP minimum', version: 'WordPress/WordPress#5.2' } | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: npm i && npm i -g [email protected] | ||
|
||
- name: Build asset | ||
run: npm run build | ||
|
||
- name: Add dependencies | ||
run: composer install -o --no-dev --ignore-platform-reqs | ||
|
||
- name: Set the core version | ||
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }} | ||
|
||
- name: Set up WP environment | ||
run: npm run env:start | ||
|
||
- name: Test | ||
run: cypress run --config-file tests/cypress/config.json --env TWITTER_API_KEY=${{ secrets.TWITTER_API_KEY }},TWITTER_API_SECRET=${{ secrets.TWITTER_API_SECRET }},TWITTER_ACCESS_TOKEN=${{ secrets.TWITTER_ACCESS_TOKEN }},TWITTER_ACCESS_SECRET=${{ secrets.TWITTER_ACCESS_SECRET }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: cypress-artifact-autoshare-for-twitter | ||
retention-days: 2 | ||
path: | | ||
${{ github.workspace }}/tests/cypress/screenshots/ | ||
${{ github.workspace }}/tests/cypress/videos/ | ||
${{ github.workspace }}/tests/cypress/logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ jobs: | |
extensions: mysql, imagick | ||
|
||
- name: Run PHPUnit | ||
run: ./bin/test.sh | ||
run: ./bin/test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"plugins": [ | ||
"https://downloads.wordpress.org/plugin/classic-editor.1.6.1.zip", | ||
"." | ||
], | ||
"env": { | ||
"tests": { | ||
"mappings": { | ||
"wp-cli.yml": "./tests/bin/wp-cli.yml" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.