-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All of those tests have either been moved to the theme or the blocks have been retired (eg. S2C). Also removed related CI jobs.
- Loading branch information
Showing
27 changed files
with
1 addition
and
1,987 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 |
---|---|---|
|
@@ -99,7 +99,7 @@ jobs: | |
command: PUPPETEER_SKIP_DOWNLOAD=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install eslint-plugin-react --unsafe-perm=true | ||
- run: | ||
name: Lint JS | ||
command: eslint "assets/src/**/*.js" "tests/e2e/**/*.js" "admin/js/**/*.js" | ||
command: eslint "assets/src/**/*.js" "admin/js/**/*.js" | ||
- store_test_results: | ||
path: /tmp/test-results | ||
|
||
|
@@ -171,66 +171,6 @@ jobs: | |
- booking.json | ||
- pr | ||
|
||
request-test-user: | ||
docker: | ||
- image: greenpeaceinternational/circleci-base:latest | ||
auth: | ||
<<: *docker_auth | ||
steps: | ||
- attach_workspace: | ||
at: /tmp/workspace | ||
- run: | ||
name: Create test user | ||
command: /usr/local/bin/test-user.py --create --instance=test-$(cat /tmp/workspace/test-instance) | ||
|
||
e2e-tests: | ||
working_directory: /usr/app/ | ||
docker: | ||
- image: mcr.microsoft.com/playwright:v1.37.1 | ||
auth: | ||
<<: *docker_auth | ||
steps: | ||
- attach_workspace: | ||
at: /tmp/workspace | ||
- checkout: | ||
path: /usr/app/planet4-plugin-gutenberg-blocks | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
npm install @playwright/[email protected] @wordpress/[email protected] dotenv | ||
npx playwright install --with-deps | ||
- run: | ||
name: End-to-end tests | ||
command: | | ||
cd /usr/app/planet4-plugin-gutenberg-blocks | ||
export TICKET=$(head -c 11 /tmp/workspace/commit-message) | ||
export WP_BASE_URL="https://www-dev.greenpeace.org/test-$(cat /tmp/workspace/test-instance)/" | ||
export WP_TEST_USERNAME="p4_test_user" | ||
export WP_TEST_PASSWORD="${WP_TEST_USER}" | ||
npx playwright test | ||
- run: | ||
name: Delete test user | ||
when: always | ||
command: | | ||
instance_repo="planet4-test-$(cat /tmp/workspace/test-instance)" | ||
curl -vvv --request POST \ | ||
--url https://circleci.com/api/v2/project/github/greenpeace/${instance_repo}/pipeline \ | ||
--header "Circle-Token: ${CIRCLE_TOKEN}" \ | ||
--header 'content-type: application/json' \ | ||
--data '{"parameters":{"run_develop":false, "run_create_test_user":false, "run_delete_test_user":true}}' | ||
- run: | ||
name: Extract tests artifacts | ||
when: always | ||
command: | | ||
mkdir -p /usr/artifacts/playwright/results /usr/artifacts/playwright/report | ||
cp -r /usr/app/planet4-plugin-gutenberg-blocks/e2e-results/* /usr/artifacts/playwright/results || true | ||
cp -r /usr/app/planet4-plugin-gutenberg-blocks/e2e-report/* /usr/artifacts/playwright/report || true | ||
cp /usr/app/planet4-plugin-gutenberg-blocks/results.xml /usr/artifacts/playwright/ || true | ||
- store_test_results: | ||
path: /usr/artifacts | ||
- store_artifacts: | ||
path: /usr/artifacts | ||
|
||
comment-pr: | ||
docker: | ||
- image: greenpeaceinternational/circleci-base:latest | ||
|
@@ -399,19 +339,6 @@ workflows: | |
<<: *on_pr | ||
requires: | ||
- instance-ready | ||
- request-test-user: | ||
<<: *on_pr | ||
requires: | ||
- instance-ready | ||
- test-user-ready: | ||
<<: *on_pr | ||
type: approval | ||
requires: | ||
- request-test-user | ||
- e2e-tests: | ||
<<: *on_pr | ||
requires: | ||
- test-user-ready | ||
- publish-zip: | ||
<<: *on_tag | ||
requires: | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.