From 3d642f4bf4eb32061ad99b63ed0a5ac0fa52d64e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Porto=20Mari=C3=B1o?= Date: Thu, 8 Jan 2026 02:36:07 +0100 Subject: [PATCH 1/2] Add Unit tests (PHPUnit) Workflow --- .github/workflows/continuous-integration.yml | 56 ++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/continuous-integration.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..a90db9f --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,56 @@ +name: CI (Continuous Integration) + +# Runs unit tests. + +on: [push] + +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + unit-tests: + name: "Unit Tests (PHPUnit)" +# needs: ["code-coverage"] + runs-on: "${{ matrix.operating-system }}" + + strategy: + fail-fast: false + matrix: + php-version: + - "8.4" # Minimum supported PHP version + - "8.5" + operating-system: + - "ubuntu-latest" + - "windows-latest" + dependency-versions: + - "locked" + - "highest" + + steps: + - name: "Configure Git (for Windows)" + if: ${{ matrix.operating-system == 'windows-latest' }} + run: | + git config --system core.autocrlf false + git config --system core.eol lf + + - name: "Checkout repository" + uses: "actions/checkout@v5" + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + php-version: "${{ matrix.php-version }}" + extensions: "sodium" + coverage: "none" + ini-values: "memory_limit=-1" + + - name: "Install dependencies (Composer)" + uses: "ramsey/composer-install@v3" + with: + dependency-versions: "${{ matrix.dependency-versions }}" + + - name: "Run unit tests (PHPUnit)" + run: "composer test" From ecc7659c73a61152e78edbde6e87655d1cbb8612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Porto=20Mari=C3=B1o?= Date: Thu, 8 Jan 2026 02:39:05 +0100 Subject: [PATCH 2/2] Remove Windows from matrix.operating-system --- .github/workflows/continuous-integration.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a90db9f..816db37 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -24,7 +24,6 @@ jobs: - "8.5" operating-system: - "ubuntu-latest" - - "windows-latest" dependency-versions: - "locked" - "highest"