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

Migrate WPAcceptance tests to Cypress #941

Merged
merged 34 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2f18e5d
Upgrade Cypress to 10.8.0
cadic Sep 19, 2022
4271f73
Ignore cypress videos
cadic Sep 19, 2022
67b004f
Add network plugin command, fix internal connection test
cadic Sep 19, 2022
3709c8a
Migrate settings test
cadic Sep 19, 2022
bd40f49
Move network and sub-site creating to the pre-script
cadic Sep 19, 2022
a4d5e5d
Merge branch 'develop' into tests/migrate-wpacc-cypress
cadic Sep 20, 2022
60cdb40
Increase timeout
cadic Sep 22, 2022
547daa8
Initialize multisite
cadic Sep 22, 2022
8fe5f69
Migrate byline test
cadic Sep 22, 2022
432f440
Merge remote-tracking branch 'origin/tests/migrate-wpacc-cypress' int…
cadic Sep 22, 2022
3e4a0ee
lint js
cadic Sep 22, 2022
72ea73c
Upload artifacts
cadic Sep 22, 2022
c18cc54
Node before test
cadic Sep 23, 2022
64a0070
Add timeout
cadic Sep 23, 2022
80f8526
Don't fail fast
cadic Sep 23, 2022
6be3bbd
Internal pull test
cadic Sep 23, 2022
c5688df
Activate theme via CLI
cadic Sep 23, 2022
e695ef1
Test Pull Post
cadic Sep 23, 2022
124b807
Test skip post
cadic Sep 23, 2022
f83dbc4
Test multiple words
cadic Sep 23, 2022
75add1a
Merge branch 'develop' into tests/migrate-wpacc-cypress
cadic Oct 3, 2022
9640ca8
Add internal-push-test.js
iamdharmesh Nov 3, 2022
009bf75
Add test for validate sync data for internal push.
iamdharmesh Nov 4, 2022
a5687d5
Merge branch 'develop' of github.com:10up/distributor into tests/migr…
iamdharmesh Nov 4, 2022
cf29cc1
Update url used in wp cli.
iamdharmesh Nov 4, 2022
3f27320
skip upload feature image to debug on failure
iamdharmesh Nov 4, 2022
0b73572
Merge branch 'develop' into tests/migrate-wpacc-cypress
iamdharmesh Nov 25, 2022
727d726
Added oEmbed E2E Tests
iamdharmesh Nov 25, 2022
18b1946
Fix eslint error.
iamdharmesh Nov 25, 2022
dc247ae
Merge branch 'develop' into tests/migrate-wpacc-cypress
peterwilsoncc Mar 21, 2023
9d861de
Bump cypress utils.
peterwilsoncc Mar 22, 2023
619ed35
Merge branch 'develop' into tests/migrate-wpacc-cypress
peterwilsoncc May 25, 2023
3e44218
Merge branch 'develop' into tests/migrate-wpacc-cypress
peterwilsoncc May 29, 2023
9130a60
Merge branch 'develop' into tests/migrate-wpacc-cypress
peterwilsoncc May 29, 2023
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
53 changes: 50 additions & 3 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,38 @@ on:
- develop
- develop-v1
jobs:
build:
name: NPM Install
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use desired version of NodeJS
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Cache Node
uses: actions/cache@v3
with:
path: |
node_modules
~/.cache
~/.npm
key: ${{ hashFiles('package-lock.json') }}

- name: Install dependencies
run: npm install

cypress:
name: ${{ matrix.core.name }} / ${{ matrix.php.name }}
needs: [build]
## Pending upgrade of `@wordpress/env` package.
continue-on-error: ${{ matrix.core.version == 'WordPress/WordPress#master' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- {name: 'PHP Default', version: null}
Expand All @@ -32,19 +58,33 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use desired version of NodeJS
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Check versions
run: npm -v; node -v

- name: Cache Node
uses: actions/cache@v3
with:
path: |
node_modules
~/.cache
~/.npm
key: ${{ hashFiles('package-lock.json') }}

- name: Install dependencies
run: npm install

- name: Composer install
run: composer install

- name: Build
run: npm run build

- name: Set the core version
run: |
./tests/bin/set-core-version.js ${{ matrix.core.version }} ${{ matrix.php.version }}
Expand All @@ -57,11 +97,18 @@ jobs:
npx wp-env run cli "wp core version"
npx wp-env run cli "php --version"

- name: Convert to multisite
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See tests/bin/initialize.sh

run: npm run to-multisite

- name: Copy .htaccess
run: npm run copy-htaccess

- name: Test
run: npm run cypress:run

- name: Upload artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-artifact
retention-days: 2
path: |
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
8 changes: 8 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Cache Node
uses: actions/cache@v3
with:
path: |
node_modules
~/.cache
~/.npm
key: ${{ hashFiles('package-lock.json') }}
- name: Check versions
run: npm -v; node -v
- name: npm install
Expand Down
Loading