File tree Expand file tree Collapse file tree 3 files changed +21
-20
lines changed
Expand file tree Collapse file tree 3 files changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -5,30 +5,28 @@ on: [push]
55jobs :
66 build-test :
77 runs-on : ubuntu-latest
8- container :
9- image : php:8.4 # This forces the job to run in a Docker container
108
119 steps :
1210 - name : Checkout
1311 uses : actions/checkout@v3
1412
15- - name : Install System Dependencies (Git, Zip, Unzip)
16- run : |
17- apt-get update
18- apt-get install -y unzip git zip
19-
20- - name : Install and Enable extensions
21- run : |
22- docker-php-ext-install sockets calendar
23- docker-php-ext-enable sockets calendar
24-
25- - name : Install Composer
26- run : |
27- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
28- composer --version
13+ - name : Setup PHP
14+ uses : shivammathur/setup-php@v2
15+ with :
16+ php-version : 8.4
17+ extensions : sockets, calendar, pcov
18+ coverage : pcov
2919
3020 - name : Install Dependencies
31- run : composer install --prefer-dist --no-progress
32-
33- - name : Run PHPUnit
34- run : vendor/bin/phpunit tests
21+ run : composer install --prefer-dist --no-progress --no-interaction --optimize-autoloader
22+
23+ - name : Run PHPUnit with Coverage
24+ run : vendor/bin/phpunit tests --coverage-clover coverage.xml --coverage-filter src
25+
26+ - name : Upload coverage to Codecov
27+ uses : codecov/codecov-action@v3
28+ with :
29+ files : ./coverage.xml
30+ flags : formatters
31+ token : ${{ secrets.CODECOV_TOKEN }}
32+ fail_ci_if_error : false
Original file line number Diff line number Diff line change @@ -7,3 +7,5 @@ node_modules
77.DS_STORE
88public_html /
99.phpunit.result.cache
10+
11+ coverage.xml
Original file line number Diff line number Diff line change 11[ ![ CI] ( https://github.com/Neuron-PHP/formatting/actions/workflows/ci.yml/badge.svg )] ( https://github.com/Neuron-PHP/formatting/actions )
2+ [ ![ codecov] ( https://codecov.io/gh/Neuron-PHP/formatting/graph/badge.svg )] ( https://codecov.io/gh/Neuron-PHP/formatting )
23
34# Neuron-PHP Formatting
45
You can’t perform that action at this time.
0 commit comments