mirror of
https://github.com/Dannecron/coverage-merger.git
synced 2025-12-25 15:52:34 +03:00
add ci workflow
This commit is contained in:
34
.github/workflows/ci.yml
vendored
Normal file
34
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
paths:
|
||||||
|
- 'src/*'
|
||||||
|
- 'tests/*'
|
||||||
|
- 'composer.json'
|
||||||
|
- 'phpunit.xml'
|
||||||
|
- 'phpcs.xml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php_version: ['8.1', '8.2']
|
||||||
|
prefer_lowest: ['yes', '']
|
||||||
|
container: dannecron/php-for-dev:${{ matrix.php_version }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Init composer.lock
|
||||||
|
run: |
|
||||||
|
composer update --no-install $(if [[ ${{ matrix.prefer_lowest }} == 'yes ]]; then echo '--prefer-lowest'; fi)
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install
|
||||||
|
- name: Run tests
|
||||||
|
run: composer run pest-coverage
|
||||||
|
# lint:
|
||||||
@@ -37,5 +37,10 @@
|
|||||||
"allow-plugins": {
|
"allow-plugins": {
|
||||||
"pestphp/pest-plugin": false
|
"pestphp/pest-plugin": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"pest": "vendor/bin/pest",
|
||||||
|
"pest-coverage": "env XDEBUG_MODE=coverage vendor/bin/pest --coverage-html=./tests/data/coverage-html --coverage-text",
|
||||||
|
"pest-coverage-html": "env XDEBUG_MODE=coverage vendor/bin/pest --coverage-html=./tests/data/coverage-html"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user