Skip to content

homogenized the path and directories retrieval process #48

homogenized the path and directories retrieval process

homogenized the path and directories retrieval process #48

Workflow file for this run

name: Woody's Store Test — https://woocommerce.woodys.extend.com/
on:
pull_request:
branches:
- master
jobs:
deploy-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Zip the updated plugin folder
run: zip -r helloextend-protection.zip helloextend-protection
- name: Upload plugin via WordPress REST API
run: |
RESPONSE=$(curl -X POST "https://woocommerce.woodys.extend.com/wp-json/wp/v2/plugins" \
-u "${{ secrets.WP_ADMIN_AUTH }}" \
-F "[email protected]")
echo "Upload Response: $RESPONSE"
- name: Install and activate plugin in Woody's WooCommerce Store
run: |
RESPONSE=$(curl -X POST "https://woocommerce.woodys.extend.com/wp-json/wp/v2/plugins/install" \
-u "${{ secrets.WP_ADMIN_AUTH }}")
echo "Install & Activate Response: $RESPONSE"
- name: Delete uploaded zip file
run: |
RESPONSE=$(curl -X DELETE "https://woocommerce.woodys.extend.com/wp-json/wp/v2/plugins/cleanup?file=helloextend-protection.zip" \
-u "${{ secrets.WP_ADMIN_AUTH }}")
echo "Cleanup Response: $RESPONSE"
- name: Install [email protected]
run: npm install [email protected]
- name: Run Cypress tests for plugin settings
run: npx cypress run --spec "cypress/integration/01_plugin_settings.cy.js"
env:
WP_ADMIN_USERNAME: ${{ secrets.WP_ADMIN_USERNAME }}
WP_ADMIN_PASSWORD: ${{ secrets.WP_ADMIN_PASSWORD }}
STORE_ID: ${{ secrets.STORE_ID }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
- name: Run Cypress frontend checks
run: npx cypress run --spec "cypress/integration/02_frontend_checks.cy.js"
- name: Run Cypress checkout tests
run: npx cypress run --spec "cypress/integration/03_order_processing_checks.cy.js"
env:
WP_ADMIN_USERNAME: ${{ secrets.WP_ADMIN_USERNAME }}
WP_ADMIN_PASSWORD: ${{ secrets.WP_ADMIN_PASSWORD }}
STORE_ID: ${{ secrets.STORE_ID }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}