From 57f35d77658ff6dc9f1b81235b460b08f193e123 Mon Sep 17 00:00:00 2001 From: Kiran Chandani Date: Wed, 5 Mar 2025 17:30:33 +0530 Subject: [PATCH 1/7] codecov badge test --- .github/workflows/codecov.yml | 36 +++++++++++++++++++++++++++++++++++ phpunit.dist.xml | 9 +++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..7ab182b --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,36 @@ +name: Code Coverage + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + coverage: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + + - name: Install dependencies + run: composer install + + - name: Run tests and collect coverage + run: vendor/bin/phpunit --coverage-clover coverage.xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml + fail_ci_if_error: true + verbose: true diff --git a/phpunit.dist.xml b/phpunit.dist.xml index bf720a4..6388fc6 100644 --- a/phpunit.dist.xml +++ b/phpunit.dist.xml @@ -24,6 +24,15 @@ + + + src/ + + + + + + From d27abc77f20e35dbfb26b82906bcdd41fd8b371e Mon Sep 17 00:00:00 2001 From: Kiran Chandani Date: Wed, 5 Mar 2025 17:35:06 +0530 Subject: [PATCH 2/7] badges added in readme --- README.md | 5 +++++ composer.json | 2 +- phpunit.dist.xml | 10 +--------- phpunitCoverage.xml | 5 +---- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index d32abbb..9298b5b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # Neo4j Query API client + +![License](https://img.shields.io/github/license/nagels-tech/neo4j-query-api) +![Version](https://img.shields.io/github/v/release/nagels-tech/neo4j-query-api) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/2cb8a1e71ed04987b1c763a09e196c84)](https://app.codacy.com/gh/nagels-tech/neo4j-query-api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) + ## Interact programmatically with Top Graph Technology - Easy to start with, just build your client in one line and start running queries diff --git a/composer.json b/composer.json index 8382c50..eae6677 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ }, "require-dev": { "guzzlehttp/guzzle": "^7.9", - "phpunit/phpunit": "^10.0", + "phpunit/phpunit": "^12.0", "friendsofphp/php-cs-fixer": "^3.68", "vimeo/psalm": "^6.8", "dg/bypass-finals": "^1.9", diff --git a/phpunit.dist.xml b/phpunit.dist.xml index 6388fc6..e4073f6 100644 --- a/phpunit.dist.xml +++ b/phpunit.dist.xml @@ -24,18 +24,10 @@ - - - src/ - - - - - - + \ No newline at end of file diff --git a/phpunitCoverage.xml b/phpunitCoverage.xml index 0ad90bd..ac61e2c 100644 --- a/phpunitCoverage.xml +++ b/phpunitCoverage.xml @@ -13,10 +13,7 @@ - - - src - + From eef26d62b459ffa3b986815f7aa57b56a1428d53 Mon Sep 17 00:00:00 2001 From: Kiran Chandani Date: Fri, 7 Mar 2025 09:57:47 +0530 Subject: [PATCH 3/7] downgraded phpunit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index eae6677..8382c50 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ }, "require-dev": { "guzzlehttp/guzzle": "^7.9", - "phpunit/phpunit": "^12.0", + "phpunit/phpunit": "^10.0", "friendsofphp/php-cs-fixer": "^3.68", "vimeo/psalm": "^6.8", "dg/bypass-finals": "^1.9", From 4c9ec9ff180698e19317031cf8260d7d8cfa4b66 Mon Sep 17 00:00:00 2001 From: Kiran Chandani Date: Fri, 7 Mar 2025 10:08:52 +0530 Subject: [PATCH 4/7] move coverage to normal test --- .github/workflows/codecov.yml | 36 --------------------- .github/workflows/test.yml | 9 +++++- phpunitCoverage.xml => phpunit.coverage.xml | 15 +++++++-- 3 files changed, 21 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/codecov.yml rename phpunitCoverage.xml => phpunit.coverage.xml (66%) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index 7ab182b..0000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Code Coverage - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - coverage: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - - - name: Install dependencies - run: composer install - - - name: Run tests and collect coverage - run: vendor/bin/phpunit --coverage-clover coverage.xml - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml - fail_ci_if_error: true - verbose: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c2caaa..8993e81 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,4 +51,11 @@ jobs: NEO4J_ADDRESS: "http://localhost:7474" NEO4J_USERNAME: "neo4j" NEO4J_PASSWORD: "password" - run: vendor/bin/phpunit --configuration phpunit.dist.xml ./tests + run: vendor/bin/phpunit --configuration phpunit.coverage.xml ./tests + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage/coverage.xml + fail_ci_if_error: true + verbose: true diff --git a/phpunitCoverage.xml b/phpunit.coverage.xml similarity index 66% rename from phpunitCoverage.xml rename to phpunit.coverage.xml index ac61e2c..7664322 100644 --- a/phpunitCoverage.xml +++ b/phpunit.coverage.xml @@ -1,6 +1,17 @@ - + From 64535bb08092fbb3a4c45ae0b7496b716e5abb4c Mon Sep 17 00:00:00 2001 From: Kiran Chandani Date: Fri, 7 Mar 2025 10:19:50 +0530 Subject: [PATCH 5/7] add badge and freeze immutable release of codedov action --- .github/workflows/test.yml | 4 ++-- README.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8993e81..738df25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: --health-retries 5 --health-timeout 5s - name: Run PHPUnit Tests + name: Run PHPUnit Tests With Coverage runs-on: ubuntu-latest steps: - name: Checkout code @@ -53,7 +53,7 @@ jobs: NEO4J_PASSWORD: "password" run: vendor/bin/phpunit --configuration phpunit.coverage.xml ./tests - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@0565863 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage/coverage.xml diff --git a/README.md b/README.md index 9298b5b..53fc4fc 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ ![License](https://img.shields.io/github/license/nagels-tech/neo4j-query-api) ![Version](https://img.shields.io/github/v/release/nagels-tech/neo4j-query-api) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/2cb8a1e71ed04987b1c763a09e196c84)](https://app.codacy.com/gh/nagels-tech/neo4j-query-api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) +[![codecov](https://codecov.io/github/nagels-tech/neo4j-query-api/graph/badge.svg?token=NTHCFY38D7)](https://codecov.io/github/nagels-tech/neo4j-query-api) ## Interact programmatically with Top Graph Technology From 1f3994a699da97b977419e9e973e26084ff91aee Mon Sep 17 00:00:00 2001 From: Kiran Chandani Date: Fri, 7 Mar 2025 10:23:12 +0530 Subject: [PATCH 6/7] add badge and use full commit hash --- .github/workflows/test.yml | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 738df25..27610b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,7 @@ jobs: NEO4J_PASSWORD: "password" run: vendor/bin/phpunit --configuration phpunit.coverage.xml ./tests - name: Upload coverage to Codecov - uses: codecov/codecov-action@0565863 + uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage/coverage.xml diff --git a/README.md b/README.md index 53fc4fc..405023f 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ ![Version](https://img.shields.io/github/v/release/nagels-tech/neo4j-query-api) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/2cb8a1e71ed04987b1c763a09e196c84)](https://app.codacy.com/gh/nagels-tech/neo4j-query-api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![codecov](https://codecov.io/github/nagels-tech/neo4j-query-api/graph/badge.svg?token=NTHCFY38D7)](https://codecov.io/github/nagels-tech/neo4j-query-api) +![Packagist Downloads](https://img.shields.io/packagist/dt/neo4j-php/query-api) ## Interact programmatically with Top Graph Technology From 5383eaeb15180e43484acf3ad645b992d5213c33 Mon Sep 17 00:00:00 2001 From: Kiran Chandani Date: Wed, 12 Mar 2025 16:32:13 +0530 Subject: [PATCH 7/7] added license in composer file --- README.md | 6 +++--- composer.json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 405023f..cf5284b 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ ![License](https://img.shields.io/github/license/nagels-tech/neo4j-query-api) ![Version](https://img.shields.io/github/v/release/nagels-tech/neo4j-query-api) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/2cb8a1e71ed04987b1c763a09e196c84)](https://app.codacy.com/gh/nagels-tech/neo4j-query-api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) -[![codecov](https://codecov.io/github/nagels-tech/neo4j-query-api/graph/badge.svg?token=NTHCFY38D7)](https://codecov.io/github/nagels-tech/neo4j-query-api) -![Packagist Downloads](https://img.shields.io/packagist/dt/neo4j-php/query-api) - +[![codecov](https://codecov.io/github/nagels-tech/neo4j-query-api/graph/badge.svg?token=NTHCFY38D7)] +[![PHP Tests](https://github.com/nagels-tech/neo4j-query-api/actions/workflows/test.yml/badge.svg)](https://github.com/nagels-tech/neo4j-query-api/actions/workflows/test.yml) +[![Psalm Static Analysis](https://github.com/nagels-tech/neo4j-query-api/actions/workflows/psalm.yml/badge.svg)](https://github.com/nagels-tech/neo4j-query-api/actions/workflows/psalm.yml) ## Interact programmatically with Top Graph Technology - Easy to start with, just build your client in one line and start running queries diff --git a/composer.json b/composer.json index 8382c50..dd76ada 100644 --- a/composer.json +++ b/composer.json @@ -1,4 +1,5 @@ { + "license" : "MIT", "type": "library", "name": "neo4j-php/query-api", "description": "Easy to use class to run Cypher queries on the Query API",