Skip to content

Test e2e Deploy to WP Engine #101107

Test e2e Deploy to WP Engine

Test e2e Deploy to WP Engine #101107

Workflow file for this run

name: Test e2e Deploy to WP Engine
on:
schedule:
- cron: '*/60 * * * *'
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-main
cancel-in-progress: false
jobs:
run_action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bump test plugin version number
run: sed -i 's/0.0.1/0.0.2/' tests/data/plugins/test-plugin/test-plugin.php
- name: GitHub Action Deploy to WP Engine
uses: ./
with:
# Deploy vars
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
WPE_ENV: ghae2e
# Deploy Options
SRC_PATH: "tests/data/plugins/test-plugin"
REMOTE_PATH: "wp-content/plugins/"
PHP_LINT: true
FLAGS: -r --backup --backup-dir=/tmp --itemize-changes
SCRIPT: "tests/data/post-deploy/test-plugin.sh"
CACHE_CLEAR: true
- name: Fetch deploy results
id: fetchResult
uses: fjogeleit/http-request-action@v1
with:
url: "https://ghae2e.wpengine.com/wp-content/plugins/test-plugin/status.json"
- name: Validate deploy results
run: |
[ ${{ fromJson(steps.fetchResult.outputs.response).status }} = "success" ] || exit 1
notify:
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
needs: run_action
steps:
- name: Notify slack on failure
if: needs.run_action.result == 'failure' && github.ref == 'refs/heads/main'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
# Channel: status-github-action
channel_id: C03QDL9U0TW
status: FAILED
color: danger