|
1 | | -name: CI |
2 | | - |
3 | | -on: [push, pull_request] |
4 | | - |
5 | | -jobs: |
6 | | - testsuite: |
7 | | - name: Unittests |
8 | | - runs-on: ubuntu-20.04 |
9 | | - strategy: |
10 | | - fail-fast: false |
11 | | - matrix: |
12 | | - php-version: ['7.4', '8.2'] |
13 | | - |
14 | | - steps: |
15 | | - - uses: actions/checkout@v2 |
16 | | - |
17 | | - - name: Setup PHP |
18 | | - uses: shivammathur/setup-php@v2 |
19 | | - with: |
20 | | - php-version: '7.4' |
21 | | - extensions: mbstring, json, fileinfo |
22 | | - tools: pecl |
23 | | - coverage: pcov |
24 | | - |
25 | | - - name: Composer install |
26 | | - run: | |
27 | | - if [[ ${{ matrix.prefer-lowest == 'prefer-lowest' }} ]]; then |
28 | | - composer update --prefer-lowest --prefer-stable |
29 | | - else |
30 | | - composer install |
31 | | - fi |
32 | | -
|
33 | | - - name: Phive install |
34 | | - run: php config/composer_phive.php |
35 | | - |
36 | | - - name: Run PHPUnit |
37 | | - run: | |
38 | | - if [[ ${{ matrix.php-version }} == '7.4' ]]; then |
39 | | - bin/phpunit --coverage-clover=coverage.xml |
40 | | - else |
41 | | - bin/phpunit |
42 | | - fi |
43 | | -
|
44 | | - - name: Code Coverage Report |
45 | | - if: success() && matrix.php-version == '7.4' |
46 | | - uses: codecov/codecov-action@v1 |
47 | | - |
48 | | - cs-stan: |
49 | | - name: Coding Standard & Static Analysis |
50 | | - runs-on: ubuntu-20.04 |
51 | | - |
52 | | - steps: |
53 | | - - uses: actions/checkout@v2 |
54 | | - |
55 | | - - name: Setup PHP |
56 | | - uses: shivammathur/setup-php@v2 |
57 | | - with: |
58 | | - php-version: '7.4' |
59 | | - extensions: mbstring, json, fileinfo |
60 | | - coverage: none |
61 | | - tools: pecl |
62 | | - |
63 | | - - name: Composer install |
64 | | - run: composer update --prefer-lowest --prefer-stable |
65 | | - |
66 | | - - name: Phive install |
67 | | - run: php config/composer_phive.php |
68 | | - |
69 | | - - name: Run phpstan |
70 | | - run: bin/phpstan -V && bin/phpstan analyse src -l 5 --error-format=github |
71 | | - |
72 | | - - name: Run phpcs |
73 | | - run: bin/phpcs --version && bin/phpcs --report=checkstyle --standard=phpcs.xml src/ tests/ |
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + testsuite: |
| 7 | + name: Unittests |
| 8 | + runs-on: ubuntu-20.04 |
| 9 | + strategy: |
| 10 | + fail-fast: false |
| 11 | + matrix: |
| 12 | + php-version: ['7.4', '8.2'] |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v2 |
| 16 | + |
| 17 | + - name: Setup PHP |
| 18 | + uses: shivammathur/setup-php@v2 |
| 19 | + with: |
| 20 | + php-version: '7.4' |
| 21 | + extensions: mbstring, json, fileinfo |
| 22 | + tools: pecl |
| 23 | + coverage: pcov |
| 24 | + |
| 25 | + - name: Composer install |
| 26 | + run: | |
| 27 | + if [[ ${{ matrix.prefer-lowest == 'prefer-lowest' }} ]]; then |
| 28 | + composer update --prefer-lowest --prefer-stable |
| 29 | + else |
| 30 | + composer install |
| 31 | + fi |
| 32 | +
|
| 33 | + - name: Phive install |
| 34 | + run: php config/composer_phive.php |
| 35 | + |
| 36 | + - name: Run PHPUnit |
| 37 | + run: | |
| 38 | + if [[ ${{ matrix.php-version }} == '7.4' ]]; then |
| 39 | + bin/phpunit --coverage-clover=coverage.xml |
| 40 | + else |
| 41 | + bin/phpunit |
| 42 | + fi |
| 43 | +
|
| 44 | + - name: Code Coverage Report |
| 45 | + if: success() && matrix.php-version == '7.4' |
| 46 | + uses: codecov/codecov-action@v1 |
| 47 | + |
| 48 | + cs-stan: |
| 49 | + name: Coding Standard & Static Analysis |
| 50 | + runs-on: ubuntu-20.04 |
| 51 | + |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v2 |
| 54 | + |
| 55 | + - name: Setup PHP |
| 56 | + uses: shivammathur/setup-php@v2 |
| 57 | + with: |
| 58 | + php-version: '7.4' |
| 59 | + extensions: mbstring, json, fileinfo |
| 60 | + coverage: none |
| 61 | + tools: pecl |
| 62 | + |
| 63 | + - name: Composer install |
| 64 | + run: composer update --prefer-lowest --prefer-stable |
| 65 | + |
| 66 | + - name: Phive install |
| 67 | + run: php config/composer_phive.php |
| 68 | + |
| 69 | + - name: Run phpstan |
| 70 | + run: bin/phpstan --error-format=github |
| 71 | + |
| 72 | + - name: Run phpcs |
| 73 | + run: bin/phpcs --report=checkstyle |
0 commit comments