Skip to content

Commit

Permalink
Merge pull request #5324 from Automattic/staging
Browse files Browse the repository at this point in the history
Production Release v20240312.0
  • Loading branch information
rebeccahum authored Mar 12, 2024
2 parents 1a97c3d + 382b9a9 commit 5f29872
Show file tree
Hide file tree
Showing 17 changed files with 1,382 additions and 662 deletions.
13 changes: 9 additions & 4 deletions .github/actions/run-wp-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ inputs:
description: The port of the MySQL server.
required: false
default: '3306'
codecov-token:
description: The token to use for CodeCov.
required: false
default: ''
runs:
using: composite
steps:
Expand All @@ -57,7 +61,7 @@ runs:
fi
- name: Set up PHP
uses: shivammathur/setup-php@2.29.0
uses: shivammathur/setup-php@2.30.0
with:
coverage: ${{ steps.coverage.outputs.coverage }}
ini-values: ${{ steps.coverage.outputs.ini }}
Expand All @@ -73,7 +77,7 @@ runs:
if: inputs.phpunit != ''

- name: Install PHP Dependencies
uses: ramsey/composer-install@2.2.0
uses: ramsey/composer-install@3.0.0

- name: Set up WordPress and WordPress Test Library
uses: sjinks/[email protected]
Expand Down Expand Up @@ -122,8 +126,9 @@ runs:
"${PHPUNIT}" ${OPTIONS}
- name: Upload coverage report
uses: codecov/codecov-action@v4.0.0
uses: codecov/codecov-action@v4.1.0
with:
files: ${{ inputs.coverage-file }}
flags: ${{ inputs.coverage-flags }}
if: ${{ steps.coverage.outputs.coverage != 'none' }}
token: ${{ inputs.codecov-token }}
if: ${{ steps.coverage.outputs.coverage != 'none' && inputs.codecov-token != '' }}
4 changes: 2 additions & 2 deletions .github/workflows/changelog-summary-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ jobs:
uses: actions/[email protected]

- name: Setup PHP
uses: shivammathur/setup-php@2.29.0
uses: shivammathur/setup-php@2.30.0

- name: Install
uses: ramsey/composer-install@2.2.0
uses: ramsey/composer-install@3.0.0

- name: Execute
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/changelog-summary-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
uses: actions/[email protected]

- name: Setup PHP
uses: shivammathur/setup-php@2.29.0
uses: shivammathur/setup-php@2.30.0

- name: Install
uses: ramsey/composer-install@2.2.0
uses: ramsey/composer-install@3.0.0

- name: Execute
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ jobs:
php: ${{ matrix.config.php }}
phpunit: ${{ matrix.config.phpunit }}
coverage: ${{ matrix.config.coverage }}
codecov-token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/core-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
cache-dependency-path: 'wordpress/package-lock.json'

- name: Set up PHP
uses: shivammathur/setup-php@2.29.0
uses: shivammathur/setup-php@2.30.0
with:
php-version: 8.0
coverage: none
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coverage-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ jobs:
jetpack: ${{ matrix.config.jp }}
php: ${{ matrix.config.php }}
coverage: 'yes'
codecov-token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/[email protected]

- name: Set up PHP
uses: shivammathur/setup-php@2.29.0
uses: shivammathur/setup-php@2.30.0
with:
coverage: none
env:
Expand All @@ -41,7 +41,7 @@ jobs:
cache: npm

- name: Install PHP Dependencies
uses: ramsey/composer-install@2.2.0
uses: ramsey/composer-install@3.0.0

- name: Lint files
run: npm run lint
Expand Down
66 changes: 33 additions & 33 deletions __tests__/e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions __tests__/e2e/specs/page__edit.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { expect, test } from '@playwright/test';
import { test } from '@playwright/test';

/**
* Internal dependencies
Expand Down Expand Up @@ -31,16 +31,22 @@ test.beforeAll( async ( { request } ) => {
body: bodyText,
postType: 'page',
} );

if ( ! response.ok() ) {
throw new Error( `Failed to create a new page. HTTP error: ${ response.status() }` );
}

const responseJSON = await response.json() as JSONResponse;
postID = responseJSON.id;
postURL = responseJSON.link;
expect( response.ok() ).toBeTruthy();
} );

test.afterAll( async ( { request } ) => {
// Delete created page
const response = await WPAPIHelper.deletePost( request, postID, 'page' );
expect( response.ok() ).toBeTruthy();
if ( ! response.ok() ) {
throw new Error( `Failed to delete the page. HTTP error: ${ response.status() }` );
}
} );

// eslint-disable-next-line playwright/expect-expect
Expand Down
12 changes: 9 additions & 3 deletions __tests__/e2e/specs/post__edit.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { expect, test } from '@playwright/test';
import { test } from '@playwright/test';

/**
* Internal dependencies
Expand Down Expand Up @@ -31,16 +31,22 @@ test.beforeAll( async ( { request } ) => {
body: bodyText,
postType: 'post',
} );

if ( ! response.ok() ) {
throw new Error( `Failed to create a new post. HTTP error: ${ response.status() }` );
}

const responseJSON = await response.json() as JSONResponse;
postID = responseJSON.id;
postURL = responseJSON.link;
expect( response.ok() ).toBeTruthy();
} );

test.afterAll( async ( { request } ) => {
// Delete created page
const response = await WPAPIHelper.deletePost( request, postID, 'post' );
expect( response.ok() ).toBeTruthy();
if ( ! response.ok() ) {
throw new Error( `Failed to delete the page. HTTP error: ${ response.status() }` );
}
} );

// eslint-disable-next-line playwright/expect-expect
Expand Down
Loading

0 comments on commit 5f29872

Please sign in to comment.