fix(xbootstrap5): load runtime scripts in the right order #148
Workflow file for this run
This file contains hidden or 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: CI | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| name: PHP ${{ matrix.php }}${{ matrix.deps && format(' / {0}', matrix.deps) || '' }}${{ matrix.coverage && ' / Coverage' || '' }} | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Lowest supported dependencies test | |
| - php: "8.2" | |
| deps: "lowest" | |
| # Standard tests across supported versions | |
| - php: "8.2" | |
| - php: "8.3" | |
| - php: "8.4" | |
| - php: "8.5" | |
| # Coverage run | |
| - php: "8.4" | |
| coverage: true | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: intl, mbstring, mysqli | |
| tools: composer | |
| coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} | |
| - name: Show versions | |
| run: | | |
| php -v | |
| composer --version | |
| - name: Get Composer cache dir | |
| id: composer-cache | |
| run: echo "dir=$(composer config --global cache-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache Composer | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.deps || 'stable' }}-${{ hashFiles('htdocs/xoops_lib/composer.dist.json', 'htdocs/xoops_lib/composer.dist.lock', '.github/workflows/ci.yml') }} | |
| restore-keys: | | |
| composer-${{ runner.os }}-${{ matrix.php }}- | |
| - name: Install XOOPS vendor dependencies | |
| working-directory: htdocs/xoops_lib | |
| run: | | |
| cp composer.dist.json composer.json | |
| cp composer.dist.lock composer.lock | |
| if [ "${{ matrix.deps }}" = "lowest" ]; then | |
| composer update --prefer-lowest --prefer-stable --no-interaction --prefer-dist --no-progress | |
| else | |
| composer install --no-interaction --prefer-dist --no-progress | |
| fi | |
| - name: Install PHPUnit | |
| run: | | |
| composer global require phpunit/phpunit:^11.2 --no-interaction --prefer-dist --no-progress | |
| echo "$(composer global config bin-dir --absolute)" >> $GITHUB_PATH | |
| - name: Check platform requirements | |
| working-directory: htdocs/xoops_lib | |
| run: composer check-platform-reqs | |
| - name: Ensure build directory exists | |
| run: mkdir -p build/logs | |
| - name: Run XOOPS tests | |
| if: ${{ !matrix.coverage }} | |
| run: cd tests && phpunit --configuration phpunit.xml.dist --stderr | |
| - name: Run XOOPS tests with coverage | |
| if: ${{ matrix.coverage }} | |
| run: cd tests && phpunit --configuration phpunit.xml.dist --stderr --coverage-clover ../build/logs/clover.xml | |
| - name: Upload coverage to Codecov | |
| if: ${{ matrix.coverage }} | |
| uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5 | |
| with: | |
| files: build/logs/clover.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false |