{"id":19663141,"url":"https://github.com/pantheon-systems/pantheon-wordpress-upstream-tests","last_synced_at":"2025-02-27T03:31:22.814Z","repository":{"id":43112764,"uuid":"63367357","full_name":"pantheon-systems/pantheon-wordpress-upstream-tests","owner":"pantheon-systems","description":"Tests behavior of WordPress Core upstreams for Pantheon. Also within test suites of contrib plugins","archived":false,"fork":false,"pushed_at":"2024-10-11T01:24:13.000Z","size":142,"stargazers_count":15,"open_issues_count":14,"forks_count":6,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-01-10T02:13:06.122Z","etag":null,"topics":["behat","hacktoberfest","testing","wordpress"],"latest_commit_sha":null,"homepage":"","language":"Gherkin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pantheon-systems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-14T20:25:38.000Z","updated_at":"2024-10-03T15:57:34.000Z","dependencies_parsed_at":"2024-09-10T11:33:12.242Z","dependency_job_id":null,"html_url":"https://github.com/pantheon-systems/pantheon-wordpress-upstream-tests","commit_stats":{"total_commits":85,"total_committers":5,"mean_commits":17.0,"dds":0.5647058823529412,"last_synced_commit":"1a0d50c12413b3643a24b578a23b819f11e35ebf"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantheon-systems%2Fpantheon-wordpress-upstream-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantheon-systems%2Fpantheon-wordpress-upstream-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantheon-systems%2Fpantheon-wordpress-upstream-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pantheon-systems%2Fpantheon-wordpress-upstream-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pantheon-systems","download_url":"https://codeload.github.com/pantheon-systems/pantheon-wordpress-upstream-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240972588,"owners_count":19886992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["behat","hacktoberfest","testing","wordpress"],"created_at":"2024-11-11T16:13:27.478Z","updated_at":"2025-02-27T03:31:22.797Z","avatar_url":"https://github.com/pantheon-systems.png","language":"Gherkin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pantheon-wordpress-upstream\n\nRuns a Behat-based test suite against a given branch of the [Pantheon WordPress upstream](https://github.com/pantheon-systems/wordpress) on [Pantheon](https://pantheon.io/) infrastructure to ensure the branch is fully functional on Pantheon.\n\n[![CircleCI](https://circleci.com/gh/pantheon-systems/pantheon-wordpress-upstream-tests.svg?style=svg)](https://circleci.com/gh/pantheon-systems/pantheon-wordpress-upstream-tests)\n\n## How It Works\n\nThe purpose of this repository is to ensure a given branch of the Pantheon WordPress Upstream is fully functional on Pantheon infrastructure. This is used as a part of Pantheon's automated WordPress updating process.\n\nOn a high level, here's how it works:\n\n1. A new CircleCI job is [initiated through a cron job](https://circleci.com/docs/nightly-builds/), or when a push is made against the WordPress upstream.\n2. The job environment defines three important environment variables:\n * `TERMINUS_TOKEN` - A [machine token](https://pantheon.io/docs/machine-tokens/) used for creating and deleting site environments on Pantheon. Because this token is meant to be kept secret, the value is set in the CircleCI admin, and not tracked in `circle.yml`.\n * `TERMINUS_SITE` - An existing Pantheon site to be used for running the test suite. This site must support [multidev](https://pantheon.io/features/multidev-cloud-environments), and the `TERMINUS_TOKEN` must be able to create and delete environments for this site.\n * `TERMINUS_ENV` - A unique name for the multidev branch to be created, to prevent collisions between jobs.\n3. CircleCI installs [Terminus](https://pantheon.io/docs/terminus/), an interface for programmatically interacting with Pantheon.\n4. The test suite runs in three steps:\n 1. [`prepare.sh`](https://github.com/pantheon-systems/pantheon-wordpress-upstream/blob/master/prepare.sh) - Prepares the Pantheon site environment to have the test suite run against it. Preparation includes:\n    * Creating the site environment using Terminus.\n 2. [`test.sh`](https://github.com/pantheon-systems/pantheon-wordpress-upstream/blob/master/test.sh) - Runs the Behat test suite against the created environment.\n 3. [`cleanup.sh`](https://github.com/pantheon-systems/pantheon-wordpress-upstream/blob/master/cleanup.sh) - Cleans up after the test suite has completed. Cleanup includes:\n    * Deleting the site environment using Terminus.\n\nAnd that's it!\n\n## Making Improvements\n\nNeed to improve this test runner in some way? You can clone the repository locally and run it against any Pantheon site.\n\n**WARNING! WARNING!**\n\n**PLEASE READ THE FOLLOWING VERY CAREFULLY.**\n\n**BY FORCE PUSHING AGAINST `TERMINUS_ENV` AND ERASING THE DATABASE, THIS TEST RUNNER IRREVOCABLY DAMAGES YOUR PANTHEON SITE. USE ONLY WITH A SINGLE-USE, \"THROWAWAY\" SITE. DO NOT USE WITH ANY PANTHEON SITE THAT CANNOT BE DELETED.** \n\nWith the warning out of the way, here's how you can use the test runner locally.\n\nFirst, make sure Terminus is installed and authenticated:\n\n    composer global require pantheon-systems/terminus\n    terminus auth login --machine-token=\u003csecret-token\u003e\n\nThen, you can clone and use the test runner:\n\n    git clone git@github.com:pantheon-systems/pantheon-wordpress-upstream-tests.git\n    cd pantheon-wordpress-upstream-tests\n    export TERMINUS_SITE=wordpress-upstream\n    export TERMINUS_ENV=test-1\n    export WORDPRESS_ADMIN_USERNAME=pantheon\n    export WORDPRESS_ADMIN_PASSWORD=\"$(openssl rand -hex 8)\"\n    ./prepare.sh\n    ./test.sh\n    ./cleanup.sh\n\nFeel free to [open an issue](https://github.com/pantheon-systems/pantheon-wordpress-upstream/issues) with any questions you may have.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantheon-systems%2Fpantheon-wordpress-upstream-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpantheon-systems%2Fpantheon-wordpress-upstream-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpantheon-systems%2Fpantheon-wordpress-upstream-tests/lists"}