From 00c9ed18d2887d32489843b4eec97915cb1e947b Mon Sep 17 00:00:00 2001
From: Gonzalo De Spirito <1103494+gdespirito@users.noreply.github.com>
Date: Wed, 14 May 2025 00:46:31 -0400
Subject: [PATCH 1/7] feat: add tests
---
.github/workflows/run-tests.yml | 45 +++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 .github/workflows/run-tests.yml
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
new file mode 100644
index 0000000..424fabe
--- /dev/null
+++ b/.github/workflows/run-tests.yml
@@ -0,0 +1,45 @@
+name: Run Tests
+
+on:
+ pull_request:
+ branches: [ main ]
+ push:
+ branches: [ main ]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ php: [7.4, 8.0, 8.1, 8.2, 8.3]
+
+ name: PHP ${{ matrix.php }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: dom, curl, libxml, mbstring, zip
+ coverage: none
+
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
+
+ - name: Cache dependencies
+ uses: actions/cache@v3
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
+
+ - name: Install dependencies
+ run: composer install --prefer-dist --no-progress
+
+ - name: Run tests
+ run: vendor/bin/pest
\ No newline at end of file
From 08405fcc3cf1a8f9a791c7f41d258ac204af34db Mon Sep 17 00:00:00 2001
From: Gonzalo De Spirito <1103494+gdespirito@users.noreply.github.com>
Date: Wed, 14 May 2025 00:50:33 -0400
Subject: [PATCH 2/7] downgrade to pest 2.0
---
composer.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composer.json b/composer.json
index 81ae4dc..3f8a5c6 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,7 @@
"php": ">=5.4.0"
},
"require-dev": {
- "pestphp/pest": "^3.8",
+ "pestphp/pest": "^2.0",
"rector/rector": "^2.0"
},
"autoload": {
From bfb9a0ee98d9d5ad0ee1ae46124d98f5638aed85 Mon Sep 17 00:00:00 2001
From: Gonzalo De Spirito <1103494+gdespirito@users.noreply.github.com>
Date: Wed, 14 May 2025 00:51:43 -0400
Subject: [PATCH 3/7] fix phpunit.xml
---
phpunit.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/phpunit.xml b/phpunit.xml
index e13c8d6..4f1e641 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -6,12 +6,12 @@
>
- ./tests/Unit
+ tests/Unit
- ./src
+ src
From ec7abb6b527733490066fe96dae60556e251e0b6 Mon Sep 17 00:00:00 2001
From: Gonzalo De Spirito <1103494+gdespirito@users.noreply.github.com>
Date: Wed, 14 May 2025 00:54:33 -0400
Subject: [PATCH 4/7] downgrade to phpunit 1.0
---
.gitignore | 3 ++-
composer.json | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index e4252e7..006e148 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@ composer.phar
composer.lock
.DS_Store
.idea
-tests/_output/*
+.phpunit.cache
+.phpunit.result.cache
\ No newline at end of file
diff --git a/composer.json b/composer.json
index 3f8a5c6..e3f15c4 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,7 @@
"php": ">=5.4.0"
},
"require-dev": {
- "pestphp/pest": "^2.0",
+ "pestphp/pest": "^1.0",
"rector/rector": "^2.0"
},
"autoload": {
From 201d16d828aa7f26d52c4ffb49f92b3e2cd384bf Mon Sep 17 00:00:00 2001
From: Gonzalo De Spirito <1103494+gdespirito@users.noreply.github.com>
Date: Wed, 14 May 2025 00:55:46 -0400
Subject: [PATCH 5/7] impreove github action
---
.github/workflows/run-tests.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 424fabe..7ca60f0 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -42,4 +42,4 @@ jobs:
run: composer install --prefer-dist --no-progress
- name: Run tests
- run: vendor/bin/pest
\ No newline at end of file
+ run: ./vendor/bin/pest --ci
\ No newline at end of file
From 0d83a95fcb5b6182b2df2b04768bc398700d2fab Mon Sep 17 00:00:00 2001
From: Gonzalo De Spirito <1103494+gdespirito@users.noreply.github.com>
Date: Wed, 14 May 2025 00:56:32 -0400
Subject: [PATCH 6/7] impreove github action
---
.github/workflows/run-tests.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 7ca60f0..5a6985d 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -24,8 +24,8 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- extensions: dom, curl, libxml, mbstring, zip
- coverage: none
+ tools: composer:v2
+ coverage: xdebug
- name: Get composer cache directory
id: composer-cache
From 5d6b652f585a89f1489b7f1317df45ca3824a981 Mon Sep 17 00:00:00 2001
From: Gonzalo De Spirito <1103494+gdespirito@users.noreply.github.com>
Date: Wed, 14 May 2025 01:05:00 -0400
Subject: [PATCH 7/7] test
---
phpunit.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/phpunit.xml b/phpunit.xml
index 4f1e641..d70d85f 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -6,7 +6,7 @@
>
- tests/Unit
+ tests/Unit