From e8b6494787d37fb605e28412c90d521f5251b5da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 7 Nov 2024 10:17:07 +0100 Subject: [PATCH] =?UTF-8?q?Switch=20to=20Laminas=E2=80=99=20CI=20Workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 46 +++++--------------------------------- .laminas-ci.json | 12 ++++++++++ .laminas-ci/pre-install.sh | 6 +++++ 3 files changed, 24 insertions(+), 40 deletions(-) create mode 100644 .laminas-ci.json create mode 100755 .laminas-ci/pre-install.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e6eca9..91ccbe6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,43 +1,9 @@ -name: PHP / Tests +name: "Continuous Integration" -on: push +on: + pull_request: + push: jobs: - phpunit: - name: "phpunit" - runs-on: "ubuntu-24.04" - - strategy: - fail-fast: false - matrix: - phpVersion: - - "8.4" - - "8.3" - - "8.2" - - steps: - - name: "Checkout" - uses: "actions/checkout@v4" - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - coverage: "none" - php-version: "${{ matrix.phpVersion }}" - tools: "cs2pr" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: "Install Tideways" - run: | - echo 'deb [signed-by=/usr/share/keyrings/tideways.gpg] https://packages.tideways.com/apt-packages-main any-version main' | sudo tee /etc/apt/sources.list.d/tideways.list > /dev/null - wget -qO - 'https://packages.tideways.com/key.gpg' | gpg --dearmor | sudo tee /usr/share/keyrings/tideways.gpg > /dev/null - sudo apt-get update - sudo apt-get install tideways-php - - - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v3" - - - name: "Run PHPUnit" - run: "php vendor/bin/phpunit" - + ci: + uses: laminas/workflow-continuous-integration/.github/workflows/continuous-integration.yml@1.x diff --git a/.laminas-ci.json b/.laminas-ci.json new file mode 100644 index 0000000..123c627 --- /dev/null +++ b/.laminas-ci.json @@ -0,0 +1,12 @@ +{ + "exclude": [ + { + "name": "PHPUnit", + "php": "8.0" + }, + { + "name": "PHPUnit", + "php": "8.1" + } + ] +} diff --git a/.laminas-ci/pre-install.sh b/.laminas-ci/pre-install.sh new file mode 100755 index 0000000..66e14ce --- /dev/null +++ b/.laminas-ci/pre-install.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo 'deb [signed-by=/usr/share/keyrings/tideways.gpg] https://packages.tideways.com/apt-packages-main any-version main' | sudo tee /etc/apt/sources.list.d/tideways.list > /dev/null +wget -qO - 'https://packages.tideways.com/key.gpg' | gpg --dearmor | sudo tee /usr/share/keyrings/tideways.gpg > /dev/null +sudo apt-get update +sudo apt-get install tideways-php