From 96abce3ab5133658da6454ccd4b8ddb7ae637984 Mon Sep 17 00:00:00 2001 From: Alexander Nostadt Date: Tue, 13 Feb 2024 22:27:57 +0100 Subject: [PATCH 1/2] TASK: Update .github/workflows/default.yml --- .github/workflows/default.yml | 84 ++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 36 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index e8ffdf1..10b4c73 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -3,59 +3,71 @@ on: [ push ] jobs: phpstan: - runs-on: ubuntu-20.04 - name: PHPStan - steps: - - name: Checkout - uses: actions/checkout@v3 + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: + - { php: 8.3 } - - name: Switch default PHP Version to 8.3 - run: sudo update-alternatives --set php /usr/bin/php8.3 + name: "Run PHPStan 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: PHPStan + - name: "Run PHPStan" run: vendor/bin/phpstan composer_normalize: - runs-on: ubuntu-20.04 - name: composer normalize - steps: - - name: Checkout - uses: actions/checkout@v3 + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: + - { php: 8.3 } - - name: Switch default PHP Version to 8.3 - run: sudo update-alternatives --set php /usr/bin/php8.3 + name: "Run composer normalize 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: 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 From 15a2964fcc0a8857075d8482796dd05c5af7c233 Mon Sep 17 00:00:00 2001 From: Alexander Nostadt Date: Wed, 14 Feb 2024 08:31:15 +0100 Subject: [PATCH 2/2] TASK: Remove unnecessary matrix --- .github/workflows/default.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 10b4c73..d4fb85c 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -4,17 +4,12 @@ on: [ push ] jobs: phpstan: runs-on: ubuntu-latest - strategy: - matrix: - php-versions: - - { php: 8.3 } - - name: "Run PHPStan with PHP ${{ matrix.php-versions.php }}" + name: "Run PHPStan with PHP 8.3" steps: - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: - php-version: "${{ matrix.php-versions.php }}" + php-version: 8.3 coverage: none env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -26,17 +21,12 @@ jobs: composer_normalize: runs-on: ubuntu-latest - strategy: - matrix: - php-versions: - - { php: 8.3 } - - name: "Run composer normalize with PHP ${{ matrix.php-versions.php }}" + name: "Run composer normalize with PHP 8.3" steps: - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: - php-version: "${{ matrix.php-versions.php }}" + php-version: 8.3 coverage: none env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}