From d672d94089ad2bdaba2965eb0f4b12f9fecfca67 Mon Sep 17 00:00:00 2001 From: Mathieu Dubois Date: Wed, 2 Oct 2024 01:35:23 +0200 Subject: [PATCH] Add GitHub actions We test up to PHP 7.4 for now --- .github/workflows/main.yaml | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..32b53e5 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,49 @@ +name: Main + +on: + workflow_dispatch: + push: + branches: + - main + - master + - release/** + pull_request: + branches: + - main + - master + - release/** + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + run: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: ['ubuntu-latest', 'macos-latest'] + php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] + steps: + - name: Get source code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + coverage: none + ini-values: post_max_size=256M, max_execution_time=180 + - run: sudo pear list + - run: sudo pear channel-update pear.php.net + - run: sudo pear upgrade --force pear/pear + - run: sudo pear list + - run: sudo pear install --force package.xml + - run: sudo pear list + - run: sudo pear package + - run: sudo pear package-validate + - run: sudo pear install --force *.tgz + - run: sudo pear list + - run: composer install + - run: ./vendor/bin/phpunit tests