name: PHPUnit on: ['push'] permissions: contents: read jobs: build: runs-on: ubuntu-latest strategy: fail-fast: true matrix: php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1'] steps: - uses: actions/checkout@v3 # https://github.com/shivammathur/setup-php (community) - name: Setup PHP, extensions and composer with shivammathur/setup-php uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: json, curl - uses: actions/setup-node@v3 with: node-version: '14' - name: Install JS dependencies run: npm ci - name: Validate composer.json and composer.lock run: composer validate --strict - name: Cache Composer packages id: composer-cache uses: actions/cache@v3 with: path: vendor key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} restore-keys: | ${{ runner.os }}-php- - name: Install dependencies run: composer update --no-interaction --no-scripts --no-progress - name: Run test suite run: composer run-script test