Disable Bacs for subscriptions with free trials #137
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: PHP code coverage | |
on: | |
push: | |
paths: | |
- '**.php' | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
name: PHP=8.1, WP=6.7, WC=9.5.2 | |
env: | |
PHP_VERSION: '8.1' | |
WP_VERSION: '6.7' | |
WC_VERSION: '9.5.2' | |
steps: | |
- name: Get Changed Files | |
id: get-changed-files | |
uses: hanseltimeindustries/get-changed-files@v1 | |
with: | |
format: 'space-delimited' | |
filter: '**/*.php' | |
- name: Checking out | |
uses: actions/checkout@v2 | |
- name: Set up dependencies caching | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/composer/ | |
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ env.PHP_VERSION }} | |
coverage: xdebug | |
- name: Set up PHPUnit 9.5 | |
run: wget https://phar.phpunit.de/phpunit-9.5.28.phar && mv phpunit-9.5.28.phar phpunit.phar | |
- name: Run CI checks | |
run: bash bin/run-ci-tests.bash | |
- name: Code Coverage Report | |
uses: irongut/[email protected] | |
with: | |
filename: php-coverage.xml | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: '60 80' | |
- name: Filter Changed Files in Report | |
run: | | |
echo "### 📈 PHP Unit Code Coverage Report" > code-coverage-results-filtered.md | |
echo "Package | Line Rate | Health" >> code-coverage-results-filtered.md | |
echo "-------- | --------- | ------" >> code-coverage-results-filtered.md | |
grep -E "$(echo ${{ steps.get-changed-files.outputs.all }} | tr ' ' '|')" code-coverage-results.md >> code-coverage-results-filtered.md | |
tail -n1 code-coverage-results.md >> code-coverage-results-filtered.md | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
header: code-coverage | |
recreate: true | |
skip_unchanged: true | |
path: code-coverage-results-filtered.md | |