-
Notifications
You must be signed in to change notification settings - Fork 34
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
E2e tests #288
Merged
Merged
E2e tests #288
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ea90257
Add Cypres test suite
oscarssanchez 7b46916
Set node env variable
oscarssanchez 00e892d
Correct syntax
oscarssanchez f54dcac
Use WP_SITEURL as baseUrl
oscarssanchez 3e6013e
Do e2e tests only on latest WP version
oscarssanchez c437e18
Merge branch 'develop' into e2e-tests
oscarssanchez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: E2E test | ||
|
||
env: | ||
NODE_VERSION: "12" | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- trunk | ||
pull_request: | ||
branches: | ||
- develop | ||
jobs: | ||
cypress: | ||
name: ${{ matrix.core.name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
core: | ||
- {name: 'WP latest', version: 'latest'} | ||
steps: | ||
- name: Install node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Composer (optional) | ||
run: composer install | ||
continue-on-error: true | ||
- name: Build (optional) | ||
run: npm run build | ||
continue-on-error: true | ||
- 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: npm run cypress:run |
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,10 @@ | ||
{ | ||
"plugins": ["."], | ||
"env": { | ||
"tests": { | ||
"mappings": { | ||
"wp-cli.yml": "./tests/bin/wp-cli.yml" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oscarssanchez are you planning to test it in multiple WP versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, any particular reason why we can't use a more recent node version instead of 12?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now just the latest version, originally I was testing it on other ones but tests were taking a long time.
As for node 12, there's some 10up packages that are incompatible with newer versions. We'll need to move to 10up toolkit but I'd like to get time approval from Apurva before moving forward with it.