-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (36 loc) · 1.13 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Unit Tests Coverage
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Start wp-env
uses: godaddy-wordpress/setup-wp-env@v1
with:
core: "WordPress/WordPress"
phpVersion: "8.1"
plugins: '["https://wordpress.org/plugins/files/2024/02/28_22-03-24_serve-static.zip"]'
- name: Checkout
uses: actions/checkout@v4
# - name: Install dependencies
# run: composer self-update && composer install && composer dump-autoload
- 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
# - 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 }}