-
Notifications
You must be signed in to change notification settings - Fork 69
41 lines (38 loc) · 1.17 KB
/
coverage.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
37
38
39
40
41
name: Code coverage
on:
pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
woocommerce-coverage:
name: Code coverage
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 10
matrix:
woocommerce: [ 'latest' ]
wordpress: [ 'latest' ]
php: [ '7.4', '8.1' ]
directory: [ 'includes', 'src' ]
env:
WP_VERSION: ${{ matrix.wordpress }}
WC_VERSION: ${{ matrix.woocommerce }}
COVERAGE_DIR: ${{ matrix.directory }}
steps:
# clone the repository
- uses: actions/checkout@v4
# enable dependencies caching
- uses: actions/cache@v4
with:
path: ~/.cache/composer/
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}-${{ hashFiles('composer.lock') }}
# setup PHP, but without debug extensions for reasonable performance
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
coverage: xdebug
# run CI checks
- run: bash bin/run-ci-tests-check-coverage.bash