Skip to content

Adding artifact

Adding artifact #31

Workflow file for this run

name: Unit Tests Coverage
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Download zip artifact
uses: actions/download-artifact@v2
with:
name: my-plugin
path: my-plugin.zip
- name: Start wp-env
uses: godaddy-wordpress/setup-wp-env@v1
with:
core: "WordPress/WordPress"
phpVersion: "8.1"
plugins: '["./my-plugin.zip"]'
- 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 tests CLI
# run: |
# npm run composer:tests-cli
- name: Run unit tests
run: |
npm run test:unit
# - name: Run tests and collect coverage
# run: vendor/bin/phpunit --coverage-clover coverage.xml .
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4-beta
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}