Skip to content

Update ci.yml

Update ci.yml #36

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
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: '["plugin.zip"]'
- name: Start wp-env
run: |
npm run wp-env start
- 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