Build #1494
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: Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| # Run this workflow at 3 AM UTC every day. | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| env: | |
| COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist --optimize-autoloader" | |
| jobs: | |
| build: | |
| name: PHP ${{ matrix.php }} test on ${{ matrix.operating-system }} | |
| runs-on: ${{ matrix.operating-system }} | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 10 | |
| matrix: | |
| operating-system: [ubuntu-latest, macos-latest, windows-latest] | |
| php: ['8.1', '8.2', '8.3', '8.4', '8.5'] | |
| experimental: [false] | |
| include: | |
| - operating-system: ubuntu-latest | |
| php: 8.1 | |
| experimental: true | |
| continue-on-error: ${{ matrix.experimental }} | |
| steps: | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: sodium, json | |
| tools: composer:v2 | |
| - name: Setup problem matchers for PHP | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
| - name: Setup problem matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - uses: actions/checkout@v2 | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate | |
| - name: Require dependencies | |
| run: 'composer require --no-update ${{ matrix.dependencies }}' | |
| - name: Install dependencies | |
| run: 'composer install ${{ env.COMPOSER_FLAGS }}' | |
| - name: PHP linting | |
| if: matrix.operating-system != 'windows-latest' | |
| run: composer lint | |
| - name: Run PHPCS | |
| run: composer phpcs | |
| - name: Generate fixtures | |
| run: composer fixtures | |
| - name: Run test suite | |
| run: composer test | |
| - name: Check dependencies for known security vulnerabilities | |
| run: composer audit --no-dev | |
| build-lowest-version: | |
| name: Build lowest version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.1' | |
| tools: composer:v2 | |
| - name: Setup problem matchers for PHP | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
| - name: Setup problem matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Download dependencies | |
| run: 'composer update ${{ env.COMPOSER_FLAGS }} --prefer-lowest' | |
| - name: Generate fixtures | |
| run: composer fixtures | |
| - name: Run test suite | |
| run: composer test |