Skip to content

Adding more

Adding more #41

Workflow file for this run

name: Unit Tests Coverage
on: [push, pull_request]
jobs:
create-zip:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Zip repository
run: zip -r plugin.zip .
- name: Upload zip file
uses: actions/upload-artifact@v2
with:
name: plugin-zip
path: plugin.zip
- name: Get artifact path
id: get-artifact-path
run: echo "::set-output name=path::$(find ${{ github.workspace }} -name 'plugin.zip')"
run:
needs: create-zip
runs-on: ubuntu-latest
steps:
- name: Start wp-env
uses: godaddy-wordpress/setup-wp-env@v1
with:
core: "WordPress/WordPress"
phpVersion: "8.1"
plugins: ${{ steps.get-artifact-path.outputs.path }}
- name: Checkout
uses: actions/checkout@v4
- name: Start WP ENV
run: |
npm run wp-env start
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "npm"
- name: Install dependencies
run: |
npm install
- name: Install Composer
run: |
composer install
- name: Run unit tests
run: |
npm run test:unit