-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.37 KB
/
phpunit.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
42
name: Unit Tests
on: [push]
jobs:
run:
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-latest', 'windows-latest' ]
php-versions: [ '8.1' ]
steps:
- name: Checkout Source.
uses: actions/checkout@v2
- name: Setup PHP 8.0
if: ${{ matrix.php-versions == '8.0' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
extensions: mbstring, intl
tools: phpunit
- name: Setup PHP 8.1
if: ${{ matrix.php-versions == '8.1' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
extensions: mbstring, intl
tools: phpunit
- name: Run PHPUnit
run: |
composer install
phpunit tests --bootstrap vendor/autoload.php --coverage-clover ./coverage.xml
php tests/timed.php 1 100000
php tests/timed.php 2 100000
- name: Push to Codecov Probably
if: ${{ matrix.php-versions == '8.1' && matrix.operating-system == 'ubuntu-latest' }}
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
verbose: true