From 13a54cee4fac4c3924e6b7fbf68a37cd9fd1b10a Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Thu, 25 Sep 2025 11:29:01 +0200 Subject: [PATCH] ci: add github actions for testing --- .github/workflows/code_checks.yaml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/code_checks.yaml diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml new file mode 100644 index 0000000..e857298 --- /dev/null +++ b/.github/workflows/code_checks.yaml @@ -0,0 +1,42 @@ +# .github/workflows/code_checks.yaml +name: Code_Checks + +on: ["push", "pull_request"] + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + + name: PHP ${{ matrix.php }} + steps: + # basically git clone + - uses: actions/checkout@v5 + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.composer/cache/files + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + # use PHP of specific version + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl + + - name: Install dependencies + run: | + composer update --no-interaction --prefer-dist + + - name: Execute main tests + run: php utils/test.php + + - name: Execute object-oriented wrapper tests + run: php utils/ootest.php + + - name: Execute additional tests + run: php utils/other-tests.php