Fix/sold 62 kolari vision price fix #115
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 "plugin=@helloextend-protection.zip") | |
| 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 Cypress@10.11.0 | |
| run: npm install cypress@10.11.0 | |
| - 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 }} |