From 473c4e527902ba9c4a0e09b5ebd309c43da81553 Mon Sep 17 00:00:00 2001 From: Greg Date: Wed, 8 Dec 2021 15:56:42 -0700 Subject: [PATCH 01/15] Added upload and test functionality --- .github/workflows/test-plugins.yml | 62 +++++++++++++++++++ packages/js/e2e-environment/CHANGELOG.md | 2 + packages/js/e2e-environment/README.md | 4 +- .../js/e2e-environment/docker-compose.yaml | 1 + packages/js/e2e-environment/upload.ini | 5 ++ .../e2e-environment/utils/get-plugin-zip.js | 60 ++++++++++++++---- packages/js/e2e-environment/utils/index.js | 3 +- .../specs/smoke-tests/update-woocommerce.js | 9 ++- .../e2e/specs/smoke-tests/upload-plugin.js | 43 +++++++++++++ 9 files changed, 172 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/test-plugins.yml create mode 100644 packages/js/e2e-environment/upload.ini create mode 100644 plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js diff --git a/.github/workflows/test-plugins.yml b/.github/workflows/test-plugins.yml new file mode 100644 index 00000000000..7e1c4c0b8ac --- /dev/null +++ b/.github/workflows/test-plugins.yml @@ -0,0 +1,62 @@ +name: Build zip for PR +on: pull_request +# on: +# release: +# types: [published] +jobs: + test-plugins: + name: Smoke tests with ${{ matrix.plugins }} plugin installed + runs-on: ubuntu-18.04 + strategy: + matrix: + plugins: [ 'automattic/woocommerce-payments', 'woocommerce/facebook-for-woocommerce', 'automattic/woocommerce-services', ${{ secrets.WC_SUBSCRIPTIONS_REPO }}] + pluginNames: [ 'WooCommerce Payments', 'Facebook for WooCommerce', 'WooCommerce Shipping & Tax', 'WooCommerce Subscriptions' ] + steps: + + - name: Create dirs. + run: | + mkdir -p code/woocommerce + mkdir -p package/woocommerce + mkdir -p tmp/woocommerce + mkdir -p node_modules + + - name: Checkout code. + uses: actions/checkout@v2 + with: + path: package/woocommerce + + - name: Install PNPM and install dependencies + working-directory: package/woocommerce + run: | + npm install -g pnpm + pnpm install + + - name: Load docker images and start containers. + working-directory: package/woocommerce/plugins/woocommerce + run: pnpm nx docker-up woocommerce + + - name: Move current directory to code. We will install zip file in this dir later. + run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce + + - name: Download WooCommerce release zip + working-directory: tmp + run: | + ASSET_ID=$(jq ".release.assets[0].id" $GITHUB_EVENT_PATH) + + curl https://api.github.com/repos/woocommerce/woocommerce/releases/assets/${ASSET_ID} -LJOH 'Accept: application/octet-stream' + + unzip woocommerce.zip -d woocommerce + mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/ + + - name: Run tests command. + working-directory: package/woocommerce/plugins/woocommerce + env: + WC_E2E_SCREENSHOTS: 1 + E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }} + E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }} + PLUGIN_REPOSITORY: ${{ matrix.plugins }} + PLUGIN_NAME: ${{ matrix.pluginNames }} + GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }} + run: | + pnpx wc-e2e test:e2e plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js + pnpm nx test-e2e woocommerce diff --git a/packages/js/e2e-environment/CHANGELOG.md b/packages/js/e2e-environment/CHANGELOG.md index 781c66330cb..b75dad74503 100644 --- a/packages/js/e2e-environment/CHANGELOG.md +++ b/packages/js/e2e-environment/CHANGELOG.md @@ -3,6 +3,8 @@ ## Added - Added `await` for every call to `shopper.logout` +- Updated `getLatestReleaseZipUrl()` to allow passing in an authorization token and simplified arguments to just the repository name +- Added `upload.ini` which increases the limits for uploading files (such as for plugins) in the Docker environment ## Fixed diff --git a/packages/js/e2e-environment/README.md b/packages/js/e2e-environment/README.md index 26752959fba..2e83b1cc70d 100644 --- a/packages/js/e2e-environment/README.md +++ b/packages/js/e2e-environment/README.md @@ -227,9 +227,9 @@ The above method also makes use of the following utility methods which can also If you would like to get the latest release zip URL, which can be used in the methods mentioned above, you can use the following helper function to do so: -`getLatestReleaseZipUrl( owner, repository, getPrerelease, perPage )` +`getLatestReleaseZipUrl( repository, authorizationToken, getPrerelease, perPage )` -This will return a string with the latest release URL. Optionally, you can use the `getPrerelease` boolean flag, which defaults to false, on whether or not to get a prerelease instead. The `perPage` flag can be used to return more results when getting the list of releases. The default value is 3. +This will return a string with the latest release URL. Optionally, you can use the `getPrerelease` boolean flag, which defaults to false, on whether or not to get a prerelease instead. The `perPage` flag can be used to return more results when getting the list of releases. The default value is 3. If the repository requires authorization to access, the authorization token can be passed in to the `authorizationToken` argument. ## Additional information diff --git a/packages/js/e2e-environment/docker-compose.yaml b/packages/js/e2e-environment/docker-compose.yaml index db7f1c91049..d9327d9adad 100644 --- a/packages/js/e2e-environment/docker-compose.yaml +++ b/packages/js/e2e-environment/docker-compose.yaml @@ -35,6 +35,7 @@ services: WORDPRESS_DEBUG: 1 volumes: - wordpress:/var/www/html + - ./upload.ini:/usr/local/etc/php/conf.d/uploads.ini - "../../../${WC_E2E_FOLDER}:${WC_E2E_FOLDER_MAPPING}" wordpress-cli: diff --git a/packages/js/e2e-environment/upload.ini b/packages/js/e2e-environment/upload.ini new file mode 100644 index 00000000000..755332dd75a --- /dev/null +++ b/packages/js/e2e-environment/upload.ini @@ -0,0 +1,5 @@ +file_uploads = On +memory_limit = 500M +upload_max_filesize = 500M +post_max_size = 500M +max_execution_time = 600 diff --git a/packages/js/e2e-environment/utils/get-plugin-zip.js b/packages/js/e2e-environment/utils/get-plugin-zip.js index a537813e408..14d2c3245e7 100644 --- a/packages/js/e2e-environment/utils/get-plugin-zip.js +++ b/packages/js/e2e-environment/utils/get-plugin-zip.js @@ -9,9 +9,10 @@ const StreamZip = require( 'node-stream-zip' ); * Upload a plugin zip from a remote location, such as a GitHub URL or other hosted location. * * @param {string} fileUrl The URL where the zip file is located. + * @param {string} authorizationToken Authorization token used to authenticate with the GitHub API if required. * @return {string} The path where the zip file is located. */ -const getRemotePluginZip = async ( fileUrl ) => { +const getRemotePluginZip = async ( fileUrl, authorizationToken = '' ) => { const appPath = getAppRoot(); const savePath = path.resolve( appPath, @@ -19,12 +20,12 @@ const getRemotePluginZip = async ( fileUrl ) => { ); mkdirp.sync( savePath ); - // Pull the filename from the end of the URL - const fileName = fileUrl.split( '/' ).pop(); + // Pull the version from the end of the URL and add .zip + const fileName = fileUrl.split( '/' ).pop() + '.zip'; let filePath = path.join( savePath, fileName ); // First, download the zip file - await downloadZip( fileUrl, filePath ); + await downloadZip( fileUrl, filePath, authorizationToken ); // Check for a nested zip and update the filepath filePath = await checkNestedZip( filePath, savePath ); @@ -35,24 +36,24 @@ const getRemotePluginZip = async ( fileUrl ) => { /** * Get the latest release zip for a plugin from a GiHub repository. * - * @param {string} owner The owner of the plugin repository. - * @param {string} repository The repository name. + * @param {string} repository The repository owner and name. For example: `woocommerce/woocommerce`. + * @param {string} authorizationToken Authorization token used to authenticate with the GitHub API if required. * @param {boolean} getPrerelease Flag on whether to get a prelease or not. * @param {number} perPage Limit of entries returned from the latest releases list, defaults to 3. * @return {Promise}} Returns the URL for the release zip file. */ const getLatestReleaseZipUrl = async ( - owner, repository, + authorizationToken = '', getPrerelease = false, perPage = 3 ) => { let requesturl; if ( getPrerelease ) { - requesturl = `https://api.github.com/repos/${ owner }/${ repository }/releases?per_page=${ perPage }`; + requesturl = `https://api.github.com/repos/${ repository }/releases?per_page=${ perPage }`; } else { - requesturl = `https://api.github.com/repos/${ owner }/${ repository }/releases/latest`; + requesturl = `https://api.github.com/repos/${ repository }/releases/latest`; } const options = { @@ -62,6 +63,11 @@ const getLatestReleaseZipUrl = async ( headers: { 'user-agent': 'node.js' }, }; + // If provided with a token, use it for authorization + if ( authorizationToken ) { + options.headers.Authorization = `token ${ authorizationToken }`; + } + // Wrap in a promise to make the request async return new Promise( function ( resolve, reject ) { request.get( options, function ( err, resp, body ) { @@ -71,11 +77,11 @@ const getLatestReleaseZipUrl = async ( // Loop until we find the first pre-release, then return it. body.forEach( ( release ) => { if ( release.prerelease ) { - resolve( release.assets[ 0 ].browser_download_url ); + resolve( release.zipball_url ); } } ); } else { - resolve( body.assets[ 0 ].browser_download_url ); + resolve( body.zipball_url ); } } ); } ); @@ -110,17 +116,24 @@ const checkNestedZip = async ( zipFilePath, savePath ) => { * @param {string} downloadPath The location where to download the zip to. * @return {Promise} */ -const downloadZip = async ( fileUrl, downloadPath ) => { +const downloadZip = async ( fileUrl, downloadPath, authorizationToken ) => { const options = { url: fileUrl, method: 'GET', encoding: null, + headers: { 'user-agent': 'node.js' }, }; + // If provided with a token, use it for authorization + if ( authorizationToken ) { + options.headers.Authorization = `token ${ authorizationToken }`; + } + // Wrap in a promise to make the request async return new Promise( function ( resolve, reject ) { request .get( options, function ( err, resp, body ) { + console.log(resp.statusCode) if ( err ) { reject( err ); } else { @@ -131,9 +144,32 @@ const downloadZip = async ( fileUrl, downloadPath ) => { } ); }; +/** + * Delete the downloaded plugin files. + */ +const deleteDownloadedPluginFiles = async () => { + const appPath = getAppRoot(); + const pluginSavePath = path.resolve( + appPath, + 'plugins/woocommerce/tests/e2e/plugins' + ); + + fs.readdir( pluginSavePath, ( err, files ) => { + if ( err ) throw err; + + for ( const file of files ) { + fs.unlink(path.join( pluginSavePath, file ), err => { + if ( err ) throw err; + } ); + } + } ); + +} + module.exports = { getRemotePluginZip, getLatestReleaseZipUrl, checkNestedZip, downloadZip, + deleteDownloadedPluginFiles, }; diff --git a/packages/js/e2e-environment/utils/index.js b/packages/js/e2e-environment/utils/index.js index baf54dc1b82..45b916a1539 100644 --- a/packages/js/e2e-environment/utils/index.js +++ b/packages/js/e2e-environment/utils/index.js @@ -1,7 +1,7 @@ const getAppRoot = require( './app-root' ); const { getAppName, getAppBase } = require( './app-name' ); const { getTestConfig, getAdminConfig, resolveLocalE2ePath } = require( './test-config' ); -const { getRemotePluginZip, getLatestReleaseZipUrl } = require('./get-plugin-zip'); +const { getRemotePluginZip, getLatestReleaseZipUrl, deleteDownloadedPluginFiles } = require('./get-plugin-zip'); const takeScreenshotFor = require( './take-screenshot' ); const updateReadyPageStatus = require('./update-ready-page'); const consoleUtils = require( './filter-console' ); @@ -15,6 +15,7 @@ module.exports = { resolveLocalE2ePath, getRemotePluginZip, getLatestReleaseZipUrl, + deleteDownloadedPluginFiles, takeScreenshotFor, updateReadyPageStatus, ...consoleUtils, diff --git a/plugins/woocommerce/tests/e2e/specs/smoke-tests/update-woocommerce.js b/plugins/woocommerce/tests/e2e/specs/smoke-tests/update-woocommerce.js index 2e0a4a4c94f..446a80cea38 100644 --- a/plugins/woocommerce/tests/e2e/specs/smoke-tests/update-woocommerce.js +++ b/plugins/woocommerce/tests/e2e/specs/smoke-tests/update-woocommerce.js @@ -3,7 +3,7 @@ */ const { merchant, utils } = require( '@woocommerce/e2e-utils' ); -const { getRemotePluginZip, getLatestReleaseZipUrl } = require( '@woocommerce/e2e-environment' ); +const { getRemotePluginZip, getLatestReleaseZipUrl, deleteDownloadedPluginFiles } = require( '@woocommerce/e2e-environment' ); /** * External dependencies @@ -24,7 +24,7 @@ utils.describeIf( UPDATE_WC )( 'WooCommerce plugin can be uploaded and activated beforeAll( async () => { if ( TEST_RELEASE ) { - zipUrl = await getLatestReleaseZipUrl( 'woocommerce', 'woocommerce' ); + zipUrl = await getLatestReleaseZipUrl( 'woocommerce/woocommerce' ); } else { zipUrl = 'https://github.com/woocommerce/woocommerce/releases/download/nightly/woocommerce-trunk-nightly.zip'; } @@ -35,6 +35,7 @@ utils.describeIf( UPDATE_WC )( 'WooCommerce plugin can be uploaded and activated afterAll( async () => { await merchant.logout(); + await deleteDownloadedPluginFiles(); }); it( 'can upload and activate the WooCommerce plugin', async () => { @@ -46,4 +47,8 @@ utils.describeIf( UPDATE_WC )( 'WooCommerce plugin can be uploaded and activated await merchant.runDatabaseUpdate(); }); + it( 'can remove downloaded plugin zip', async () => { + await deleteDownloadedPluginFiles(); + } ); + }); diff --git a/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js b/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js new file mode 100644 index 00000000000..aeab4072747 --- /dev/null +++ b/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js @@ -0,0 +1,43 @@ +/** + * Internal dependencies + */ +const { merchant } = require( '@woocommerce/e2e-utils' ); + +const { getRemotePluginZip, getLatestReleaseZipUrl, deleteDownloadedPluginFiles } = require( '@woocommerce/e2e-environment' ); + +/** + * External dependencies + */ +const { + it, + beforeAll, +} = require( '@jest/globals' ); + +const { PLUGIN_REPOSITORY, PLUGIN_NAME, GITHUB_TOKEN } = process.env; + +let zipUrl; +let pluginPath; + +describe( 'Upload and activate plugin', () => { + beforeAll( async () => { + zipUrl = await getLatestReleaseZipUrl( PLUGIN_REPOSITORY, GITHUB_TOKEN ); + + pluginPath = await getRemotePluginZip( zipUrl, GITHUB_TOKEN ); + + await merchant.login(); + }); + + afterAll( async () => { + await merchant.logout(); + await deleteDownloadedPluginFiles(); + }); + + it( 'can upload and activate the provided plugin', async () => { + await merchant.uploadAndActivatePlugin( pluginPath, PLUGIN_NAME ); + }); + + it( 'can remove downloaded plugin zip', async () => { + await deleteDownloadedPluginFiles(); + } ); + +}); From 287df6e10b87f0b90a8de737f30f7f45bfe8bf3c Mon Sep 17 00:00:00 2001 From: Greg Date: Wed, 8 Dec 2021 15:58:58 -0700 Subject: [PATCH 02/15] Update workflow name --- .github/workflows/test-plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-plugins.yml b/.github/workflows/test-plugins.yml index 7e1c4c0b8ac..7af01529d1b 100644 --- a/.github/workflows/test-plugins.yml +++ b/.github/workflows/test-plugins.yml @@ -1,4 +1,4 @@ -name: Build zip for PR +name: Run smoke tests against plugins on: pull_request # on: # release: From 24f2f557429928a471d9476141d666a65c539d14 Mon Sep 17 00:00:00 2001 From: Greg Date: Wed, 8 Dec 2021 16:40:42 -0700 Subject: [PATCH 03/15] Use a different syntax --- .github/workflows/test-plugins.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-plugins.yml b/.github/workflows/test-plugins.yml index 7af01529d1b..021017ed4f6 100644 --- a/.github/workflows/test-plugins.yml +++ b/.github/workflows/test-plugins.yml @@ -8,9 +8,17 @@ jobs: name: Smoke tests with ${{ matrix.plugins }} plugin installed runs-on: ubuntu-18.04 strategy: - matrix: - plugins: [ 'automattic/woocommerce-payments', 'woocommerce/facebook-for-woocommerce', 'automattic/woocommerce-services', ${{ secrets.WC_SUBSCRIPTIONS_REPO }}] - pluginNames: [ 'WooCommerce Payments', 'Facebook for WooCommerce', 'WooCommerce Shipping & Tax', 'WooCommerce Subscriptions' ] + matrix: + include: + - plugin: 'WooCommerce Payments' + repo: 'automattic/woocommerce-payments' + - plugin: 'Facebook for WooCommerce' + repo: 'woocommerce/facebook-for-woocommerce' + - plugin: 'WooCommerce Shipping & Tax' + repo: 'woocommerce/woocommerce-services' + - plugin: 'WooCommerce Subscriptions' + repo: WC_SUBSCRIPTIONS_REPO + private: true steps: - name: Create dirs. @@ -54,8 +62,8 @@ jobs: WC_E2E_SCREENSHOTS: 1 E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }} E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }} - PLUGIN_REPOSITORY: ${{ matrix.plugins }} - PLUGIN_NAME: ${{ matrix.pluginNames }} + PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }} + PLUGIN_NAME: ${{ matrix.plugin }} GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }} run: | pnpx wc-e2e test:e2e plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js From 44eedb0ee97106a8da9a523bee300bcda1ded6a7 Mon Sep 17 00:00:00 2001 From: Greg Date: Wed, 8 Dec 2021 17:23:00 -0700 Subject: [PATCH 04/15] Run on trunk code --- .github/workflows/test-plugins.yml | 33 ++++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-plugins.yml b/.github/workflows/test-plugins.yml index 021017ed4f6..ea558f3000e 100644 --- a/.github/workflows/test-plugins.yml +++ b/.github/workflows/test-plugins.yml @@ -20,18 +20,17 @@ jobs: repo: WC_SUBSCRIPTIONS_REPO private: true steps: - - name: Create dirs. run: | - mkdir -p code/woocommerce - mkdir -p package/woocommerce - mkdir -p tmp/woocommerce - mkdir -p node_modules + mkdir -p code/woocommerce + mkdir -p package/woocommerce + mkdir -p tmp/woocommerce + mkdir -p node_modules - name: Checkout code. uses: actions/checkout@v2 with: - path: package/woocommerce + path: package/woocommerce - name: Install PNPM and install dependencies working-directory: package/woocommerce @@ -41,20 +40,28 @@ jobs: - name: Load docker images and start containers. working-directory: package/woocommerce/plugins/woocommerce - run: pnpm nx docker-up woocommerce + run: pnpx wc-e2e docker:up - name: Move current directory to code. We will install zip file in this dir later. run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce - - name: Download WooCommerce release zip + - name: Download WooCommerce ZIP. + uses: actions/download-artifact@v2 + with: + name: woocommerce + path: tmp + + - name: Extract and replace WooCommerce zip. working-directory: tmp run: | - ASSET_ID=$(jq ".release.assets[0].id" $GITHUB_EVENT_PATH) + unzip woocommerce.zip -d woocommerce + mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/ - curl https://api.github.com/repos/woocommerce/woocommerce/releases/assets/${ASSET_ID} -LJOH 'Accept: application/octet-stream' - - unzip woocommerce.zip -d woocommerce - mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/ + - name: Install dependencies again + working-directory: package/woocommerce + run: | + npm install -g pnpm + pnpm install - name: Run tests command. working-directory: package/woocommerce/plugins/woocommerce From 4a577e9f1ea9bd0098025880c0e52e5e8c785a82 Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 9 Dec 2021 08:58:08 -0700 Subject: [PATCH 05/15] Added some more plugins --- .github/workflows/test-plugins.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-plugins.yml b/.github/workflows/test-plugins.yml index ea558f3000e..d32bf655923 100644 --- a/.github/workflows/test-plugins.yml +++ b/.github/workflows/test-plugins.yml @@ -1,13 +1,13 @@ -name: Run smoke tests against plugins -on: pull_request -# on: -# release: -# types: [published] +name: On release run smoke tests against plugins +on: + release: + types: [published] jobs: test-plugins: - name: Smoke tests with ${{ matrix.plugins }} plugin installed + name: Smoke tests with ${{ matrix.plugin }} plugin installed runs-on: ubuntu-18.04 strategy: + fail-fast: false matrix: include: - plugin: 'WooCommerce Payments' @@ -19,6 +19,10 @@ jobs: - plugin: 'WooCommerce Subscriptions' repo: WC_SUBSCRIPTIONS_REPO private: true + - plugin: 'WordPress SEO' # Yoast SEO in the UI, but the slug is wordpress-seo + repo: 'Yoast/wordpress-seo' + - plugin: 'Contact Form 7' + repo: 'takayukister/contact-form-7' steps: - name: Create dirs. run: | @@ -30,7 +34,8 @@ jobs: - name: Checkout code. uses: actions/checkout@v2 with: - path: package/woocommerce + path: package/woocommerce + ref: trunk - name: Install PNPM and install dependencies working-directory: package/woocommerce From 9621e13de56f98e4b19bad26e36fc75ad69566dc Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 9 Dec 2021 09:01:37 -0700 Subject: [PATCH 06/15] Run the plugin test on PR --- .github/workflows/test-plugins.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-plugins.yml b/.github/workflows/test-plugins.yml index d32bf655923..d6141792550 100644 --- a/.github/workflows/test-plugins.yml +++ b/.github/workflows/test-plugins.yml @@ -1,7 +1,8 @@ name: On release run smoke tests against plugins -on: - release: - types: [published] +# on: +# release: +# types: [published] +on: pull_request jobs: test-plugins: name: Smoke tests with ${{ matrix.plugin }} plugin installed From c6cdf87aa7d61c418f4ba7e6504375a4325c5df8 Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 9 Dec 2021 14:07:13 -0700 Subject: [PATCH 07/15] Remove standalone run and add to smoke and release testing --- .github/workflows/smoke-test-daily.yml | 100 +++++++++++++++++++++++ .github/workflows/smoke-test-release.yml | 71 ++++++++++++++++ .github/workflows/test-plugins.yml | 83 ------------------- 3 files changed, 171 insertions(+), 83 deletions(-) delete mode 100644 .github/workflows/test-plugins.yml diff --git a/.github/workflows/smoke-test-daily.yml b/.github/workflows/smoke-test-daily.yml index 68fb656a777..632256aa752 100644 --- a/.github/workflows/smoke-test-daily.yml +++ b/.github/workflows/smoke-test-daily.yml @@ -52,3 +52,103 @@ jobs: pnpx wc-e2e test:e2e plugins/woocommerce/tests/e2e/specs/smoke-tests/update-woocommerce.js pnpx wc-e2e test:e2e pnpx wc-api-tests test api + + build: + name: Build zip for PR + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build + id: build + uses: woocommerce/action-build@trunk + env: + BUILD_ENV: e2e + + - name: Upload PR zip + uses: actions/upload-artifact@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + name: woocommerce + path: ${{ steps.build.outputs.zip_path }} + retention-days: 7 + + test-plugins: + name: Smoke tests with ${{ matrix.plugin }} plugin installed + runs-on: ubuntu-18.04 + needs: [build] + strategy: + fail-fast: false + matrix: + include: + - plugin: 'WooCommerce Payments' + repo: 'automattic/woocommerce-payments' + - plugin: 'Facebook for WooCommerce' + repo: 'woocommerce/facebook-for-woocommerce' + - plugin: 'WooCommerce Shipping & Tax' + repo: 'woocommerce/woocommerce-services' + - plugin: 'WooCommerce Subscriptions' + repo: WC_SUBSCRIPTIONS_REPO + private: true + - plugin: 'WordPress SEO' # Yoast SEO in the UI, but the slug is wordpress-seo + repo: 'Yoast/wordpress-seo' + - plugin: 'Contact Form 7' + repo: 'takayukister/contact-form-7' + steps: + - name: Create dirs. + run: | + mkdir -p code/woocommerce + mkdir -p package/woocommerce + mkdir -p tmp/woocommerce + mkdir -p node_modules + + - name: Checkout code. + uses: actions/checkout@v2 + with: + path: package/woocommerce + + - name: Install PNPM and install dependencies + working-directory: package/woocommerce + run: | + npm install -g pnpm + pnpm install + + - name: Load docker images and start containers. + working-directory: package/woocommerce/plugins/woocommerce + run: pnpx wc-e2e docker:up + + - name: Move current directory to code. We will install zip file in this dir later. + run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce + + - name: Download WooCommerce ZIP. + uses: actions/download-artifact@v2 + with: + name: woocommerce + path: tmp + + - name: Extract and replace WooCommerce zip. + working-directory: tmp + run: | + unzip woocommerce.zip -d woocommerce + mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/ + + - name: Install dependencies again + working-directory: package/woocommerce + run: | + npm install -g pnpm + pnpm install + + - name: Run tests command. + working-directory: package/woocommerce/plugins/woocommerce + env: + WC_E2E_SCREENSHOTS: 1 + E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }} + E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }} + PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }} + PLUGIN_NAME: ${{ matrix.plugin }} + GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }} + run: | + pnpx wc-e2e test:e2e plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js + pnpm nx test-e2e woocommerce diff --git a/.github/workflows/smoke-test-release.yml b/.github/workflows/smoke-test-release.yml index 5090b57c36b..e51c0d519ab 100644 --- a/.github/workflows/smoke-test-release.yml +++ b/.github/workflows/smoke-test-release.yml @@ -105,3 +105,74 @@ jobs: E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }} E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }} run: pnpm nx test-e2e woocommerce + + test-plugins: + name: Smoke tests with ${{ matrix.plugin }} plugin installed + runs-on: ubuntu-18.04 + strategy: + fail-fast: false + matrix: + include: + - plugin: 'WooCommerce Payments' + repo: 'automattic/woocommerce-payments' + - plugin: 'Facebook for WooCommerce' + repo: 'woocommerce/facebook-for-woocommerce' + - plugin: 'WooCommerce Shipping & Tax' + repo: 'woocommerce/woocommerce-services' + - plugin: 'WooCommerce Subscriptions' + repo: WC_SUBSCRIPTIONS_REPO + private: true + - plugin: 'WordPress SEO' # Yoast SEO in the UI, but the slug is wordpress-seo + repo: 'Yoast/wordpress-seo' + - plugin: 'Contact Form 7' + repo: 'takayukister/contact-form-7' + steps: + - name: Create dirs. + run: | + mkdir -p code/woocommerce + mkdir -p package/woocommerce + mkdir -p tmp/woocommerce + mkdir -p node_modules + + - name: Checkout code. + uses: actions/checkout@v2 + with: + path: package/woocommerce + + - name: Install PNPM and install dependencies + working-directory: package/woocommerce + run: | + npm install -g pnpm + pnpm install + + - name: Load docker images and start containers. + working-directory: package/woocommerce/plugins/woocommerce + env: + LATEST_WP_VERSION_MINUS: ${{ matrix.wp }} + run: pnpm nx docker-up woocommerce + + - name: Move current directory to code. We will install zip file in this dir later. + run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce + + - name: Download WooCommerce release zip + working-directory: tmp + run: | + ASSET_ID=$(jq ".release.assets[0].id" $GITHUB_EVENT_PATH) + + curl https://api.github.com/repos/woocommerce/woocommerce/releases/assets/${ASSET_ID} -LJOH 'Accept: application/octet-stream' + + unzip woocommerce.zip -d woocommerce + mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/ + + - name: Run tests command. + working-directory: package/woocommerce/plugins/woocommerce + env: + WC_E2E_SCREENSHOTS: 1 + E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }} + E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }} + PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }} + PLUGIN_NAME: ${{ matrix.plugin }} + GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }} + run: | + pnpx wc-e2e test:e2e plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js + pnpm nx test-e2e woocommerce diff --git a/.github/workflows/test-plugins.yml b/.github/workflows/test-plugins.yml deleted file mode 100644 index d6141792550..00000000000 --- a/.github/workflows/test-plugins.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: On release run smoke tests against plugins -# on: -# release: -# types: [published] -on: pull_request -jobs: - test-plugins: - name: Smoke tests with ${{ matrix.plugin }} plugin installed - runs-on: ubuntu-18.04 - strategy: - fail-fast: false - matrix: - include: - - plugin: 'WooCommerce Payments' - repo: 'automattic/woocommerce-payments' - - plugin: 'Facebook for WooCommerce' - repo: 'woocommerce/facebook-for-woocommerce' - - plugin: 'WooCommerce Shipping & Tax' - repo: 'woocommerce/woocommerce-services' - - plugin: 'WooCommerce Subscriptions' - repo: WC_SUBSCRIPTIONS_REPO - private: true - - plugin: 'WordPress SEO' # Yoast SEO in the UI, but the slug is wordpress-seo - repo: 'Yoast/wordpress-seo' - - plugin: 'Contact Form 7' - repo: 'takayukister/contact-form-7' - steps: - - name: Create dirs. - run: | - mkdir -p code/woocommerce - mkdir -p package/woocommerce - mkdir -p tmp/woocommerce - mkdir -p node_modules - - - name: Checkout code. - uses: actions/checkout@v2 - with: - path: package/woocommerce - ref: trunk - - - name: Install PNPM and install dependencies - working-directory: package/woocommerce - run: | - npm install -g pnpm - pnpm install - - - name: Load docker images and start containers. - working-directory: package/woocommerce/plugins/woocommerce - run: pnpx wc-e2e docker:up - - - name: Move current directory to code. We will install zip file in this dir later. - run: mv ./package/woocommerce/plugins/woocommerce/* ./code/woocommerce - - - name: Download WooCommerce ZIP. - uses: actions/download-artifact@v2 - with: - name: woocommerce - path: tmp - - - name: Extract and replace WooCommerce zip. - working-directory: tmp - run: | - unzip woocommerce.zip -d woocommerce - mv woocommerce/woocommerce/* ../package/woocommerce/plugins/woocommerce/ - - - name: Install dependencies again - working-directory: package/woocommerce - run: | - npm install -g pnpm - pnpm install - - - name: Run tests command. - working-directory: package/woocommerce/plugins/woocommerce - env: - WC_E2E_SCREENSHOTS: 1 - E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }} - E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }} - PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }} - PLUGIN_NAME: ${{ matrix.plugin }} - GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }} - run: | - pnpx wc-e2e test:e2e plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js - pnpm nx test-e2e woocommerce From 54d1379deb7fcf82c6922db6b65e4d8c01d6e71a Mon Sep 17 00:00:00 2001 From: Greg Date: Mon, 13 Dec 2021 16:11:22 -0700 Subject: [PATCH 08/15] Rename plugin_repository variable --- .../woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js b/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js index aeab4072747..211de9f1e5a 100644 --- a/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js +++ b/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js @@ -13,14 +13,14 @@ const { beforeAll, } = require( '@jest/globals' ); -const { PLUGIN_REPOSITORY, PLUGIN_NAME, GITHUB_TOKEN } = process.env; +const { GITHUB_REPOSITORY, PLUGIN_NAME, GITHUB_TOKEN } = process.env; let zipUrl; let pluginPath; describe( 'Upload and activate plugin', () => { beforeAll( async () => { - zipUrl = await getLatestReleaseZipUrl( PLUGIN_REPOSITORY, GITHUB_TOKEN ); + zipUrl = await getLatestReleaseZipUrl( GITHUB_REPOSITORY, GITHUB_TOKEN ); pluginPath = await getRemotePluginZip( zipUrl, GITHUB_TOKEN ); From 6fb892bca4ae3623c9512357a6aee6a44409275f Mon Sep 17 00:00:00 2001 From: Greg Date: Tue, 14 Dec 2021 10:56:44 -0700 Subject: [PATCH 09/15] Linting updates --- packages/js/e2e-environment/utils/get-plugin-zip.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/js/e2e-environment/utils/get-plugin-zip.js b/packages/js/e2e-environment/utils/get-plugin-zip.js index 14d2c3245e7..cd85b11d4d7 100644 --- a/packages/js/e2e-environment/utils/get-plugin-zip.js +++ b/packages/js/e2e-environment/utils/get-plugin-zip.js @@ -114,6 +114,7 @@ const checkNestedZip = async ( zipFilePath, savePath ) => { * * @param {string} fileUrl The URL where the zip file is located. * @param {string} downloadPath The location where to download the zip to. + * @param {string} authorizationToken Authorization token used to authenticate with the GitHub API if required. * @return {Promise} */ const downloadZip = async ( fileUrl, downloadPath, authorizationToken ) => { @@ -133,7 +134,6 @@ const downloadZip = async ( fileUrl, downloadPath, authorizationToken ) => { return new Promise( function ( resolve, reject ) { request .get( options, function ( err, resp, body ) { - console.log(resp.statusCode) if ( err ) { reject( err ); } else { @@ -158,13 +158,12 @@ const deleteDownloadedPluginFiles = async () => { if ( err ) throw err; for ( const file of files ) { - fs.unlink(path.join( pluginSavePath, file ), err => { - if ( err ) throw err; + fs.unlink( path.join( pluginSavePath, file ), ( error ) => { + if ( error ) throw error; } ); } } ); - -} +}; module.exports = { getRemotePluginZip, From b9231cbf242360f5e2178b39b90228d6bd40e492 Mon Sep 17 00:00:00 2001 From: Greg Date: Tue, 14 Dec 2021 11:11:53 -0700 Subject: [PATCH 10/15] Regex fix --- packages/js/e2e-environment/utils/get-plugin-zip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/js/e2e-environment/utils/get-plugin-zip.js b/packages/js/e2e-environment/utils/get-plugin-zip.js index cd85b11d4d7..4873d0609a4 100644 --- a/packages/js/e2e-environment/utils/get-plugin-zip.js +++ b/packages/js/e2e-environment/utils/get-plugin-zip.js @@ -99,7 +99,7 @@ const checkNestedZip = async ( zipFilePath, savePath ) => { const entries = await zip.entries(); for ( const entry of Object.values( entries ) ) { - if ( entry.name.match( /.zip/ ) ) { + if ( entry.name.match( /\.zip/ ) ) { await zip.extract( null, savePath ); await zip.close(); return path.join( savePath, entry.name ); From 7c8bd91b2523767f0ab931e4b5a0b7819e890eba Mon Sep 17 00:00:00 2001 From: Greg Date: Wed, 15 Dec 2021 13:55:24 -0700 Subject: [PATCH 11/15] Use describeIf to check for running plugin upload --- .../woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js b/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js index 211de9f1e5a..ec419d883bd 100644 --- a/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js +++ b/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js @@ -1,7 +1,7 @@ /** * Internal dependencies */ -const { merchant } = require( '@woocommerce/e2e-utils' ); +const { merchant, utils } = require( '@woocommerce/e2e-utils' ); const { getRemotePluginZip, getLatestReleaseZipUrl, deleteDownloadedPluginFiles } = require( '@woocommerce/e2e-environment' ); @@ -18,7 +18,7 @@ const { GITHUB_REPOSITORY, PLUGIN_NAME, GITHUB_TOKEN } = process.env; let zipUrl; let pluginPath; -describe( 'Upload and activate plugin', () => { +utils.describeIf( GITHUB_REPOSITORY )( 'Upload and activate plugin', () => { beforeAll( async () => { zipUrl = await getLatestReleaseZipUrl( GITHUB_REPOSITORY, GITHUB_TOKEN ); From fdee881ab86d419b2acce3c60c48d0fda85a4eba Mon Sep 17 00:00:00 2001 From: Greg Date: Wed, 15 Dec 2021 13:59:17 -0700 Subject: [PATCH 12/15] Prettier fixes --- packages/js/e2e-environment/utils/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/js/e2e-environment/utils/index.js b/packages/js/e2e-environment/utils/index.js index 04330c419ab..f50c8a012e8 100644 --- a/packages/js/e2e-environment/utils/index.js +++ b/packages/js/e2e-environment/utils/index.js @@ -1,11 +1,13 @@ const getAppRoot = require( './app-root' ); const { getAppName, getAppBase } = require( './app-name' ); -const { getTestConfig, getAdminConfig, resolveLocalE2ePath } = require( './test-config' ); -const { getRemotePluginZip, getLatestReleaseZipUrl, deleteDownloadedPluginFiles } = require('./get-plugin-zip'); const testConfig = require( './test-config' ); -const { getRemotePluginZip, getLatestReleaseZipUrl } = require('./get-plugin-zip'); +const { + getRemotePluginZip, + getLatestReleaseZipUrl, + deleteDownloadedPluginFiles, +} = require( './get-plugin-zip' ); const takeScreenshotFor = require( './take-screenshot' ); -const updateReadyPageStatus = require('./update-ready-page'); +const updateReadyPageStatus = require( './update-ready-page' ); const consoleUtils = require( './filter-console' ); module.exports = { From 89d74d4bc34cc4fa1d4ac2479dca965758c29281 Mon Sep 17 00:00:00 2001 From: Greg Date: Wed, 15 Dec 2021 14:06:19 -0700 Subject: [PATCH 13/15] Update to use new resolveLocalE2ePath --- packages/js/e2e-environment/utils/get-plugin-zip.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/js/e2e-environment/utils/get-plugin-zip.js b/packages/js/e2e-environment/utils/get-plugin-zip.js index b7bc084b537..2c9cf9fc66c 100644 --- a/packages/js/e2e-environment/utils/get-plugin-zip.js +++ b/packages/js/e2e-environment/utils/get-plugin-zip.js @@ -1,9 +1,9 @@ const path = require( 'path' ); -const getAppRoot = require( './app-root' ); const fs = require( 'fs' ); const mkdirp = require( 'mkdirp' ); const request = require( 'request' ); const StreamZip = require( 'node-stream-zip' ); +const { resolveLocalE2ePath } = require( './test-config' ); /** * Upload a plugin zip from a remote location, such as a GitHub URL or other hosted location. @@ -13,7 +13,6 @@ const StreamZip = require( 'node-stream-zip' ); * @return {string} The path where the zip file is located. */ const getRemotePluginZip = async ( fileUrl, authorizationToken = '' ) => { - const appPath = getAppRoot(); const savePath = resolveLocalE2ePath( 'plugins' ); mkdirp.sync( savePath ); @@ -145,11 +144,7 @@ const downloadZip = async ( fileUrl, downloadPath, authorizationToken ) => { * Delete the downloaded plugin files. */ const deleteDownloadedPluginFiles = async () => { - const appPath = getAppRoot(); - const pluginSavePath = path.resolve( - appPath, - 'plugins/woocommerce/tests/e2e/plugins' - ); + const pluginSavePath = resolveLocalE2ePath( 'plugins' ); fs.readdir( pluginSavePath, ( err, files ) => { if ( err ) throw err; From 77bb3e958d6e7d5c5218f83bf4bdaf89fd0967b7 Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 16 Dec 2021 09:58:11 -0700 Subject: [PATCH 14/15] Logic for private repos and minor tweaks --- .github/workflows/smoke-test-daily.yml | 2 +- .github/workflows/smoke-test-release.yml | 2 +- .../js/e2e-environment/utils/get-plugin-zip.js | 14 ++++++++++---- .../tests/e2e/specs/smoke-tests/upload-plugin.js | 1 - 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/smoke-test-daily.yml b/.github/workflows/smoke-test-daily.yml index 632256aa752..078f683a4a1 100644 --- a/.github/workflows/smoke-test-daily.yml +++ b/.github/workflows/smoke-test-daily.yml @@ -146,7 +146,7 @@ jobs: WC_E2E_SCREENSHOTS: 1 E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }} E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }} - PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }} + GITHUB_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }} PLUGIN_NAME: ${{ matrix.plugin }} GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }} run: | diff --git a/.github/workflows/smoke-test-release.yml b/.github/workflows/smoke-test-release.yml index e51c0d519ab..a5365841e52 100644 --- a/.github/workflows/smoke-test-release.yml +++ b/.github/workflows/smoke-test-release.yml @@ -170,7 +170,7 @@ jobs: WC_E2E_SCREENSHOTS: 1 E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }} E2E_SLACK_CHANNEL: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }} - PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }} + GITHUB_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }} PLUGIN_NAME: ${{ matrix.plugin }} GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }} run: | diff --git a/packages/js/e2e-environment/utils/get-plugin-zip.js b/packages/js/e2e-environment/utils/get-plugin-zip.js index 2c9cf9fc66c..e1077bae98c 100644 --- a/packages/js/e2e-environment/utils/get-plugin-zip.js +++ b/packages/js/e2e-environment/utils/get-plugin-zip.js @@ -16,8 +16,8 @@ const getRemotePluginZip = async ( fileUrl, authorizationToken = '' ) => { const savePath = resolveLocalE2ePath( 'plugins' ); mkdirp.sync( savePath ); - // Pull the version from the end of the URL and add .zip - const fileName = fileUrl.split( '/' ).pop() + '.zip'; + // Pull the version from the end of the URL + const fileName = fileUrl.split( '/' ).pop(); let filePath = path.join( savePath, fileName ); // First, download the zip file @@ -73,11 +73,17 @@ const getLatestReleaseZipUrl = async ( // Loop until we find the first pre-release, then return it. body.forEach( ( release ) => { if ( release.prerelease ) { - resolve( release.zipball_url ); + resolve( release.assets[ 0 ].browser_download_url ); } } ); + } else if ( authorizationToken ) { + // If it's a private repo, we need to download the archive this way + const tagName = body.tag_name; + resolve( + `https://github.com/${ repository }/archive/${ tagName }.zip` + ); } else { - resolve( body.zipball_url ); + resolve( body.assets[ 0 ].browser_download_url ); } } ); } ); diff --git a/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js b/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js index ec419d883bd..1bdb3a950a4 100644 --- a/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js +++ b/plugins/woocommerce/tests/e2e/specs/smoke-tests/upload-plugin.js @@ -29,7 +29,6 @@ utils.describeIf( GITHUB_REPOSITORY )( 'Upload and activate plugin', () => { afterAll( async () => { await merchant.logout(); - await deleteDownloadedPluginFiles(); }); it( 'can upload and activate the provided plugin', async () => { From 07a96e3aaa29e877e8e3812923f490a7cc7eba24 Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 16 Dec 2021 13:32:43 -0700 Subject: [PATCH 15/15] Swap out plugins --- .github/workflows/smoke-test-daily.yml | 4 ++-- .github/workflows/smoke-test-release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/smoke-test-daily.yml b/.github/workflows/smoke-test-daily.yml index 078f683a4a1..2145213e988 100644 --- a/.github/workflows/smoke-test-daily.yml +++ b/.github/workflows/smoke-test-daily.yml @@ -85,8 +85,8 @@ jobs: include: - plugin: 'WooCommerce Payments' repo: 'automattic/woocommerce-payments' - - plugin: 'Facebook for WooCommerce' - repo: 'woocommerce/facebook-for-woocommerce' + - plugin: 'WooCommerce PayPal Payments' + repo: 'woocommerce/woocommerce-paypal-payments' - plugin: 'WooCommerce Shipping & Tax' repo: 'woocommerce/woocommerce-services' - plugin: 'WooCommerce Subscriptions' diff --git a/.github/workflows/smoke-test-release.yml b/.github/workflows/smoke-test-release.yml index a5365841e52..9475a07ebda 100644 --- a/.github/workflows/smoke-test-release.yml +++ b/.github/workflows/smoke-test-release.yml @@ -115,8 +115,8 @@ jobs: include: - plugin: 'WooCommerce Payments' repo: 'automattic/woocommerce-payments' - - plugin: 'Facebook for WooCommerce' - repo: 'woocommerce/facebook-for-woocommerce' + - plugin: 'WooCommerce PayPal Payments' + repo: 'woocommerce/woocommerce-paypal-payments' - plugin: 'WooCommerce Shipping & Tax' repo: 'woocommerce/woocommerce-services' - plugin: 'WooCommerce Subscriptions'