Build #120
This file contains 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: Build | |
on: | |
push: | |
branches: ['*'] | |
pull_request: | |
branches: ['5.0'] | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 5" | |
jobs: | |
PHPUnit-Memory: | |
strategy: | |
fail-fast: false | |
matrix: | |
php_versions: ['8.1', '8.2', '8.3', '8.4'] | |
node_versions: [18, 20] | |
runs-on: ubuntu-latest | |
name: PHPUnit - PHP ${{ matrix.php_versions }} - Node ${{ matrix.node_versions }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php_versions }} | |
extensions: mbstring, dom, fileinfo, gd, pdo_sqlite | |
coverage: xdebug | |
tools: pecl, composer | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node_versions }} | |
- name: Install Dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Npm Install | |
run: npm ci | |
- name: Run Webpack | |
run: npm run dev | |
- name: Execute tests | |
run: | | |
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
vendor/bin/phpunit | |
- name: Upload coverage to Codecov | |
if: github.event_name != 'schedule' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./_meta/coverage.xml | |
fail_ci_if_error: true |