diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index e8ffdf1..d4fb85c 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -3,59 +3,61 @@ on: [ push ] jobs: phpstan: - runs-on: ubuntu-20.04 - name: PHPStan + runs-on: ubuntu-latest + name: "Run PHPStan with PHP 8.3" steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + coverage: none + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Switch default PHP Version to 8.3 - run: sudo update-alternatives --set php /usr/bin/php8.3 + - uses: "ramsey/composer-install@v2" - - name: Install Composer dependencies - run: composer install - - - name: PHPStan + - name: "Run PHPStan" run: vendor/bin/phpstan composer_normalize: - runs-on: ubuntu-20.04 - name: composer normalize + runs-on: ubuntu-latest + name: "Run composer normalize with PHP 8.3" steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Switch default PHP Version to 8.3 - run: sudo update-alternatives --set php /usr/bin/php8.3 + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + coverage: none + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install Composer dependencies - run: composer install + - uses: "ramsey/composer-install@v2" - - name: Normalize + - name: "Run composer normalize" run: composer normalize phpunit: + runs-on: ubuntu-latest strategy: matrix: - version: - - /usr/bin/php8.2 - - /usr/bin/php8.3 - runs-on: ubuntu-20.04 - name: "PHPUnit with ${{ matrix.version }}" - steps: - - name: "Checkout" - uses: actions/checkout@v3 + php-versions: + - { php: 8.2 } + - { php: 8.3 } - - name: "Switch default PHP to: ${{ matrix.version }}" - run: sudo update-alternatives --set php ${{ matrix.version }} + name: "Run PHPUnit with PHP ${{ matrix.php-versions.php }}" + steps: + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@v2 + with: + php-version: "${{ matrix.php-versions.php }}" + coverage: none + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: "Install Composer dependencies" - run: composer install + - uses: "ramsey/composer-install@v2" - - name: "Print versions" + - name: "Print versions and run" run: | php --version vendor/bin/phpunit --version - - - name: "PHPUnit" - run: vendor/bin/phpunit \ No newline at end of file + vendor/bin/phpunit \ No newline at end of file