From 9be7bb9f6c22a6a9382478e6ef4d8e0f2a3e6794 Mon Sep 17 00:00:00 2001 From: vlad kobilansky Date: Thu, 26 Sep 2024 09:37:38 -0700 Subject: [PATCH 1/6] adding a function --- resources/js/classes/person.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/js/classes/person.js b/resources/js/classes/person.js index 0961784..48d230c 100644 --- a/resources/js/classes/person.js +++ b/resources/js/classes/person.js @@ -53,4 +53,8 @@ getStatus() { return 'status'; } + + getAnotherValue() { + return 'another value'; + } } \ No newline at end of file From 2f0e9af78d241df247ce545436d011fb315248bf Mon Sep 17 00:00:00 2001 From: vlad kobilansky Date: Thu, 26 Sep 2024 09:45:32 -0700 Subject: [PATCH 2/6] fixing flows --- .github/workflows/main.yaml | 2 +- .github/workflows/pr-only.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b1b1a50..5c39ec4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -110,7 +110,7 @@ jobs: run: npm run test - name: Upload Javascript coverage - run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'javascript'-${{ github.run_id }} -F 'javascript' -f coverage/index.html + run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'javascript'-${{ github.run_id }} -F 'javascript' -f coverage/coverage-final.json - name: Trigger notifications run: ./codecov send-notifications -t ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/pr-only.yaml b/.github/workflows/pr-only.yaml index 8a3a76b..5ae29ed 100644 --- a/.github/workflows/pr-only.yaml +++ b/.github/workflows/pr-only.yaml @@ -108,7 +108,7 @@ jobs: run: npm run test - name: Upload Javascript coverage - run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'javascript'-${{ github.run_id }} -F 'javascript' -f coverage/index.html + run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'javascript'-${{ github.run_id }} -F 'javascript' -f coverage/coverage-final.json - name: Trigger notifications run: ./codecov send-notifications -t ${{ secrets.CODECOV_TOKEN }} From b96bd35b0ad1abfc6493b4a41ae7534b9627a4cc Mon Sep 17 00:00:00 2001 From: vlad kobilansky Date: Thu, 26 Sep 2024 10:24:04 -0700 Subject: [PATCH 3/6] adding a borken test --- tests/Unit/ChargeTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Unit/ChargeTest.php b/tests/Unit/ChargeTest.php index 3fc5e38..bf808af 100644 --- a/tests/Unit/ChargeTest.php +++ b/tests/Unit/ChargeTest.php @@ -78,7 +78,7 @@ public function testReturnTrue() { $charge = Charge::factory()->make(); $result = $charge->returnTrue(); - $this->assertTrue($result); + $this->assertFalse($result); } public function testGetSomeValue() { From d0e4880fed4df1af869592573081bbe2d386e1c5 Mon Sep 17 00:00:00 2001 From: vlad kobilansky Date: Thu, 26 Sep 2024 10:28:09 -0700 Subject: [PATCH 4/6] fixing a borken test --- tests/Unit/ChargeTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Unit/ChargeTest.php b/tests/Unit/ChargeTest.php index bf808af..3fc5e38 100644 --- a/tests/Unit/ChargeTest.php +++ b/tests/Unit/ChargeTest.php @@ -78,7 +78,7 @@ public function testReturnTrue() { $charge = Charge::factory()->make(); $result = $charge->returnTrue(); - $this->assertFalse($result); + $this->assertTrue($result); } public function testGetSomeValue() { From 478c32904870d47ba85c29a945cdde6a06cc5d09 Mon Sep 17 00:00:00 2001 From: vlad kobilansky Date: Thu, 26 Sep 2024 10:32:19 -0700 Subject: [PATCH 5/6] adjustng names --- .github/workflows/pr-only.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-only.yaml b/.github/workflows/pr-only.yaml index 5ae29ed..75b7a7a 100644 --- a/.github/workflows/pr-only.yaml +++ b/.github/workflows/pr-only.yaml @@ -83,19 +83,19 @@ jobs: run: vendor/bin/phpunit --testsuite="Services Tests" --coverage-clover=coverage-service.xml --log-junit junit-service.xml - name: Upload Service coverage report - run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service -f coverage-service.xml + run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n service-${{ github.run_id }} -F service -f coverage-service.xml - name: Run Controller Testsuite with Coverage run: vendor/bin/phpunit --testsuite="Controllers Tests" --coverage-clover=coverage-controller.xml --log-junit junit-controller.xml - name: Upload Controller coverage report - run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'controller'-${{ github.run_id }} -F controller -f coverage-controller.xml + run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n controller-${{ github.run_id }} -F controller -f coverage-controller.xml - name: Run Unit Testsuite with Coverage and Junit output run: vendor/bin/phpunit --testsuite="Unit Tests" --coverage-clover=coverage-unit.xml --log-junit junit-unit.xml - name: Upload unit test coverage report - run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'unit'-${{ github.run_id }} -F unit -f coverage-unit.xml + run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n unit-${{ github.run_id }} -F unit -f coverage-unit.xml - name: Upload Junit test results to Codecov if: ${{ !cancelled() }} @@ -108,7 +108,7 @@ jobs: run: npm run test - name: Upload Javascript coverage - run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'javascript'-${{ github.run_id }} -F 'javascript' -f coverage/coverage-final.json + run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n javascript-${{ github.run_id }} -F javascript -f coverage/coverage-final.json - name: Trigger notifications run: ./codecov send-notifications -t ${{ secrets.CODECOV_TOKEN }} From 97cf8ee68053c1202b936516f7475e695dfc9ad4 Mon Sep 17 00:00:00 2001 From: vlad kobilansky Date: Wed, 30 Oct 2024 18:21:25 -0400 Subject: [PATCH 6/6] adding a dummy file, remoing path --- .github/workflows/pr-only.yaml | 6 ++++++ codecov.yml | 12 +++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-only.yaml b/.github/workflows/pr-only.yaml index 75b7a7a..310a0e1 100644 --- a/.github/workflows/pr-only.yaml +++ b/.github/workflows/pr-only.yaml @@ -110,6 +110,12 @@ jobs: - name: Upload Javascript coverage run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n javascript-${{ github.run_id }} -F javascript -f coverage/coverage-final.json + - name: Create a dummy file + run: touch dummy-file.txt + + - name: Upload dummy file to Codecov + run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n dummy-${{ github.run_id }} -F dummy -f dummy-file.txt + - name: Trigger notifications run: ./codecov send-notifications -t ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/codecov.yml b/codecov.yml index 5eed98a..8d0f608 100644 --- a/codecov.yml +++ b/codecov.yml @@ -22,6 +22,11 @@ coverage: target: 80% flags: - javascript + +codecov: + notify: + manual_trigger: true + notify_error: true github_checks: #does not work if flags are configured annotations: true @@ -63,14 +68,7 @@ component_management: individual_components: - component_id: "backend" name: "backend" - paths: - - ".*" flag_regexes: # List of lags to be included in the component. - "unit" - "controller" - "service" - -codecov: - notify: - manual_trigger: true - notify_error: true