Skip to content

Test e2e Deploy to WP Engine #56655

Test e2e Deploy to WP Engine

Test e2e Deploy to WP Engine #56655

Workflow file for this run

name: Test e2e Deploy to WP Engine
on:
schedule:
- cron: '*/5 * * * *'
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@v3
- 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: Deploy to WP Engine
uses: ./.github/actions/deploy
with:
# Deploy vars
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
WPE_ENV: sitedeploye2e
# 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://sitedeploye2e.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-site-deploy
channel_id: C04ELD8NMT4
status: FAILED
color: danger