Update ci.yml #36
This file contains 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: 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 |