Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/godaddy-wordpress/setup-wp-env
Github Action for running a WordPress install using @wordpress/env.
https://github.com/godaddy-wordpress/setup-wp-env
actions wordpress wp-env
Last synced: about 1 month ago
JSON representation
Github Action for running a WordPress install using @wordpress/env.
- Host: GitHub
- URL: https://github.com/godaddy-wordpress/setup-wp-env
- Owner: godaddy-wordpress
- License: gpl-2.0
- Created: 2022-10-06T17:23:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-26T16:01:15.000Z (about 2 years ago)
- Last Synced: 2024-04-14T20:27:03.532Z (9 months ago)
- Topics: actions, wordpress, wp-env
- Homepage:
- Size: 10.7 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Setup @wordpress/env (wp-env)
This Action will setup and start [@wordpress/env](https://github.com/WordPress/gutenberg/tree/HEAD/packages/env) for quick and efficient continuous integration (CI) testing with WordPress.
## Usage
Use this Action in one of your project [workflows](https://docs.github.com/en/actions/using-workflows) steps:
```yaml
jobs:
wp-env:
runs-on: ubuntu-latest
name: Setup WordPress Environment
steps:
- name: Start wp-env
uses: godaddy-wordpress/setup-wp-env@v1
```### Usage with .wp-env.json
This Action assumes that no `.wp-env.json` is present in the project that uses this Action in a workflow. If a `.wp-env.json` file is present in the project, this Action config will override that config; however, if no inputs are provided that already exist in `.wp-env.json`, those will be used instead (this is how `@wordpress/env` is designed).
If your project includes a `.wp-env.json` at root, it is best to explicitly add all necessary inputs in order to override the `.wp-env.json` which exists in the project.
## Options
This action allows configuration of each option found in [`.wp-env.json`](https://github.com/WordPress/gutenberg/tree/HEAD/packages/env#wp-envjson), except the port (it is unnecessary, as each runner is encapsulated). These are added as strings, and later converted to JSON and added to `.wp-env.override.json`.
### Examples
```yaml
- name: Start wp-env
uses: godaddy-wordpress/setup-wp-env@v1
with:
core: 'WordPress/WordPress#5.9'
phpVersion: '7.4'
plugins: '["https://downloads.wordpress.org/plugin/coblocks.zip"]'
themes: '["https://downloads.wordpress.org/theme/go.zip"]'
```> Please note that when adding plugins and themes for integration testing, it is a best practice to use the official released of those projects (not development versions). This will greatly reduce the time for setup and ensures you are only downloading the necessary code for testing.
---
Copyright © 2022 [GoDaddy Operating Company, LLC](https://godaddy.com) · All Rights Reserved · [License](LICENSE)
[![GoDaddy Engineering](https://raw.githubusercontent.com/godaddy-wordpress/.github/master/assets/godaddy-oss-readme-banner.webp)](https://www.godaddy.com/engineering/)