Stability++ #230
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: "Tests" | |
on: | |
push: | |
branches: [master] | |
paths-ignore: | |
- '**.md' | |
- 'cli/' | |
- 'electron/' | |
- 'www/' | |
pull_request: | |
branches: [master] | |
paths-ignore: | |
- '**.md' | |
- 'cli/' | |
- 'electron/' | |
- 'www/' | |
jobs: | |
server-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: "Install Linux dependencies" | |
timeout-minutes: 1 | |
run: | | |
sudo apt-get update && sudo apt-get install -y \ | |
composer | |
- name: "Install Composer dependencies" | |
timeout-minutes: 1 | |
run: | | |
composer install -o | |
- name: "Run Composer check" | |
timeout-minutes: 1 | |
run: | | |
export XDEBUG_MODE=off | |
composer unit | |
false | |
- name: "Check code coverage min percentage" | |
timeout-minutes: 4 | |
run: | | |
echo '<?php preg_match("~Lines:\s+([\d.]+)%~", stream_get_contents(STDIN), $m);exit((int)((float)$m[1] < 100));' > cc.php | |
export XDEBUG_MODE=coverage | |
composer unit -- --stderr --no-progress --colors=never \ | |
--coverage-xml=www/coverage/coverage-xml --log-junit=www/coverage/junit.xml \ | |
--coverage-text --only-summary-for-coverage-text 2> cc.txt | |
cat cc.txt | |
grep 'Lines: ' cc.txt | php -d error_reporting=E_ALL cc.php | |
- name: "Check infection mutation framework min percentage" | |
timeout-minutes: 5 | |
run: | | |
export XDEBUG_MODE=off | |
grep '"timeout": 20,' infection.json5 | |
sed -i 's/"timeout": 20,/"timeout": 40,/' infection.json5 | |
composer infection-cache -- --threads=$(($(nproc) + 1)) --only-covering-test-cases --skip-initial-tests |