diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5552811f..9666e137 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,14 +13,19 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set PHP Version - run: sudo update-alternatives --set php /usr/bin/php7.4 + - name: 'Checkout code' + uses: actions/checkout@v3 - - name: Checkout - uses: actions/checkout@v2 + - name: 'Install PHP' + uses: shivammathur/setup-php@v2 + with: + coverage: none + php-version: 7.4 + tools: composer:v2 + ini-values: date.timezone=UTC - - name: Validate - run: composer validate --strict + - name: Validate composer.json file + run: composer validate --strict stable-tests: name: Stable Tests @@ -29,27 +34,19 @@ jobs: strategy: fail-fast: false matrix: - php-versions: [ '7.4', '8.0' ] + php-version: ['7.4', '8.0'] steps: - - name: Set PHP Version - run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }} - - - name: Get PHP Version - run: | - ver=$(php -v | grep -oP '(?<=PHP )\d.\d') - echo "::set-output name=version::$ver" - id: php-ver - - - name: Using PHP Version from matrix - run: | - echo "Runner is not using PHP Version defined in the php-versions matrix." - php -v - exit 1 - if: steps.php-ver.outputs.version != matrix.php-versions - - - name: Checkout - uses: actions/checkout@v2 + - name: 'Checkout code' + uses: actions/checkout@v3 + + - name: 'Install PHP' + uses: shivammathur/setup-php@v2 + with: + coverage: none + php-version: ${{ matrix.php-version }} + tools: composer:v2 + ini-values: date.timezone=UTC - name: Install Composer Dependencies run: composer install --no-progress