|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +jobs: |
| 8 | + PHP_Lowest: |
| 9 | + name: PHP wth lowest dependencies |
| 10 | + runs-on: ubuntu-latest |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + php-versions: ['7.2'] |
| 15 | + experimental: [false] |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v2 |
| 20 | + - name: Setup PHP, with composer and extensions |
| 21 | + uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php |
| 22 | + with: |
| 23 | + php-version: ${{ matrix.php-versions }} |
| 24 | + extensions: bcmath, ctype, fileinfo, json, mbstring, dom, ldap, pdo, tokenizer, xml, mysql, sqlite |
| 25 | + coverage: xdebug |
| 26 | + - name: Downgrade phpunit for php7.2 |
| 27 | + run: composer update phpunit/phpunit -W |
| 28 | + - name: Update to lowest php dependencies |
| 29 | + run: composer update --prefer-lowest |
| 30 | + - name: Install php dependencies |
| 31 | + run: composer install --dev --no-interaction |
| 32 | + - name: Execute tests without coverage |
| 33 | + run: vendor/bin/phpunit --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite" |
| 34 | + |
| 35 | + PHP: |
| 36 | + name: PHP ${{ matrix.php-versions }} |
| 37 | + runs-on: ubuntu-latest |
| 38 | + strategy: |
| 39 | + fail-fast: false |
| 40 | + matrix: |
| 41 | + php-versions: ['7.2','7.3','7.4','8.0'] |
| 42 | + experimental: [false] |
| 43 | + include: |
| 44 | + - php-versions: '8.1' |
| 45 | + experimental: true |
| 46 | + |
| 47 | + steps: |
| 48 | + - name: Checkout |
| 49 | + uses: actions/checkout@v2 |
| 50 | + - name: Setup PHP, with composer and extensions |
| 51 | + uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php |
| 52 | + with: |
| 53 | + php-version: ${{ matrix.php-versions }} |
| 54 | + extensions: bcmath, ctype, fileinfo, json, mbstring, dom, ldap, pdo, tokenizer, xml, mysql, sqlite |
| 55 | + coverage: xdebug |
| 56 | + - name: Downgrade phpunit for php7.2 |
| 57 | + if: ${{ matrix.php-versions == '7.2' }} |
| 58 | + run: composer update phpunit/phpunit -W |
| 59 | + - name: Install php dependencies |
| 60 | + run: composer install --dev --no-interaction |
| 61 | + continue-on-error: ${{ matrix.experimental }} |
| 62 | + - name: Execute code style check via php-cs-fixer |
| 63 | + run: vendor/bin/php-cs-fixer fix --dry-run |
| 64 | + continue-on-error: ${{ matrix.experimental }} |
| 65 | + - name: Execute tests with coverage |
| 66 | + if: ${{ !matrix.experimental }} |
| 67 | + run: | |
| 68 | + mkdir -p build/logs |
| 69 | + vendor/bin/phpunit --coverage-clover=build/logs/coverage.xml --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite" |
| 70 | + - name: Execute tests without coverage |
| 71 | + if: ${{ matrix.experimental }} |
| 72 | + run: vendor/bin/phpunit --testsuite="BigBlueButton test suite" |
| 73 | + continue-on-error: true |
| 74 | + - name: Coveralls |
| 75 | + env: |
| 76 | + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 77 | + if: ${{ matrix.php-versions == '7.2' && env.COVERALLS_REPO_TOKEN != null }} |
| 78 | + run: vendor/bin/php-coveralls --coverage_clover=build/logs/coverage.xml -v |
0 commit comments