From c1b02371b46597c844323923c31a9a871198c98f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 31 Jul 2025 13:28:50 +0000 Subject: [PATCH 1/5] Initial plan From 3e258e40508967ebbeabf8f3595897a992eb8554 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 31 Jul 2025 13:42:26 +0000 Subject: [PATCH 2/5] Add CI checks with GitHub Actions Co-authored-by: dasco144 <10575019+dasco144@users.noreply.github.com> --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + composer.json | 3 +-- phpunit.xml | 14 ++++++------- 4 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..be8feda --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + test: + name: Test PHP ${{ matrix.php-version }} + runs-on: ubuntu-latest + + strategy: + matrix: + php-version: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: none + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php-${{ matrix.php-version }}- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Run test suite + run: vendor/bin/phpunit \ No newline at end of file diff --git a/.gitignore b/.gitignore index 40df76f..2dc317e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ composer.lock composer.phar vendor/ .idea/ +.phpunit.result.cache diff --git a/composer.json b/composer.json index b6127cc..1ec5626 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,5 @@ { "name": "luno/luno-php", - "version": "0.0.14", "type": "library", "description": "PHP SDK for the Luno API", "keywords": ["luno", "bitcoin", "ethereum"], @@ -22,6 +21,6 @@ "netresearch/jsonmapper": "^1.4" }, "require-dev": { - "phpunit/phpunit": "7.1.4" + "phpunit/phpunit": "^9.0" } } diff --git a/phpunit.xml b/phpunit.xml index 820d393..2e6a2c0 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,15 +1,13 @@ - + + + + src/Luno/ + + test/ - - - src/Luno/ - - From 010ce9b1e61f2c62fc90656a23b01f5ed075f885 Mon Sep 17 00:00:00 2001 From: Daniel Santiago Date: Thu, 31 Jul 2025 16:25:28 +0200 Subject: [PATCH 3/5] Update actions/cache version used Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be8feda..75a93b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} From 45acaf69031501c80735f63352cd9ba8732b3629 Mon Sep 17 00:00:00 2001 From: Daniel Santiago Date: Tue, 12 Aug 2025 15:45:27 +0200 Subject: [PATCH 4/5] Remove master branch Co-authored-by: Ed Harrod --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75a93b2..12cf870 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ main, master ] + branches: [ main ] pull_request: - branches: [ main, master ] + branches: [ main ] jobs: test: From b0f932de42fc393b51d942bb7d962431efb39b6a Mon Sep 17 00:00:00 2001 From: Daniel Santiago Date: Tue, 12 Aug 2025 15:45:45 +0200 Subject: [PATCH 5/5] Narrow supported versions Co-authored-by: Ed Harrod --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12cf870..7f3938e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - php-version: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php-version: ['8.2', '8.3', '8.4'] steps: - name: Checkout code