From 83439185729a610792706f5022a028f0d6c9cc3d Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 19:48:28 +0200 Subject: [PATCH 01/10] Fix CI coverage --- .github/workflows/CI.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bdd33bf..b1d399b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -114,6 +114,8 @@ jobs: name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true + move_coverage_to_trash: false + verbose: ${{ runner.debug == '1' }} - name: Upload functional tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} @@ -123,6 +125,8 @@ jobs: name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true + move_coverage_to_trash: false + verbose: ${{ runner.debug == '1' }} - name: Upload coverages to Codacy if: ${{ env.COVERAGE_TYPE == 'xdebug' }} From d0e9b6d4e29b0da8df4740b23774d66779d1143d Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 19:50:31 +0200 Subject: [PATCH 02/10] Upgrade actions to node v16 --- .github/workflows/CI.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b1d399b..12f23ca 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -53,7 +53,7 @@ jobs: symfony-version: '5.4' steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Enable coverage if: ${{ matrix.php-version == '8.1' }} @@ -73,7 +73,7 @@ jobs: - name: Setup cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.composer @@ -137,7 +137,7 @@ jobs: runs-on: ubuntu-latest needs: [ tests ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP 8.1 uses: shivammathur/setup-php@v2 @@ -151,7 +151,7 @@ jobs: - name: Setup cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.composer @@ -175,7 +175,7 @@ jobs: steps: - name: Setup cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ${{ env.CODACY_CACHE_PATH }} @@ -217,7 +217,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup PHP ${{ matrix.php-version }} uses: shivammathur/setup-php@v2 @@ -231,7 +231,7 @@ jobs: - name: Setup cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/.composer From 1e30be5c3ebaf32000d0683b7058ed2c096b22ee Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 20:01:16 +0200 Subject: [PATCH 03/10] DEBUG --- .github/workflows/CI.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 12f23ca..5c1340c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -105,6 +105,10 @@ jobs: - name: Tests run: make test-unit && make test-functional + - name: DEBUG + if: ${{ env.COVERAGE_TYPE == 'xdebug' }} + run: ls -ail build/coverage-*/ + # See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server - name: Upload unit tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} @@ -117,6 +121,10 @@ jobs: move_coverage_to_trash: false verbose: ${{ runner.debug == '1' }} + - name: DEBUG + if: ${{ env.COVERAGE_TYPE == 'xdebug' }} + run: ls -ail build/coverage-*/ + - name: Upload functional tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} uses: codecov/codecov-action@v3 @@ -128,6 +136,10 @@ jobs: move_coverage_to_trash: false verbose: ${{ runner.debug == '1' }} + - name: DEBUG + if: ${{ env.COVERAGE_TYPE == 'xdebug' }} + run: ls -ail build/coverage-*/ + - name: Upload coverages to Codacy if: ${{ env.COVERAGE_TYPE == 'xdebug' }} run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial From 1feff49bc0060a4e6125fd7483afcea0684fe9e9 Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 20:07:22 +0200 Subject: [PATCH 04/10] Try --- .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 5c1340c..a630a6e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -118,7 +118,7 @@ jobs: name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true - move_coverage_to_trash: false + move_coverage_to_trash: 0 verbose: ${{ runner.debug == '1' }} - name: DEBUG @@ -133,7 +133,7 @@ jobs: name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true - move_coverage_to_trash: false + move_coverage_to_trash: 0 verbose: ${{ runner.debug == '1' }} - name: DEBUG From 7e8e088a80dc28f8dc5286535b07ccd3b3f87825 Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 20:11:04 +0200 Subject: [PATCH 05/10] Move codacy upload first --- .github/workflows/CI.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a630a6e..9560815 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -109,6 +109,16 @@ jobs: if: ${{ env.COVERAGE_TYPE == 'xdebug' }} run: ls -ail build/coverage-*/ + # Upload to codacy first as codecov action always remove coverage files + # despite the disabled move_coverage_to_trash option + - name: Upload coverages to Codacy + if: ${{ env.COVERAGE_TYPE == 'xdebug' }} + run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial + + - name: DEBUG + if: ${{ env.COVERAGE_TYPE == 'xdebug' }} + run: ls -ail build/coverage-*/ + # See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server - name: Upload unit tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} @@ -140,10 +150,6 @@ jobs: if: ${{ env.COVERAGE_TYPE == 'xdebug' }} run: ls -ail build/coverage-*/ - - name: Upload coverages to Codacy - if: ${{ env.COVERAGE_TYPE == 'xdebug' }} - run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial - static-checks: name: Static checks runs-on: ubuntu-latest From 41e4ae13b81a667b17c23bdfc99f5f77b0c243c4 Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 20:17:29 +0200 Subject: [PATCH 06/10] Try without the option --- .github/workflows/CI.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9560815..21d662f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -128,7 +128,6 @@ jobs: name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true - move_coverage_to_trash: 0 verbose: ${{ runner.debug == '1' }} - name: DEBUG @@ -143,7 +142,6 @@ jobs: name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true - move_coverage_to_trash: 0 verbose: ${{ runner.debug == '1' }} - name: DEBUG From 70fdce266e655526cbc5b1d7cde8c2d32989fe28 Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 20:18:47 +0200 Subject: [PATCH 07/10] Try with false --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 21d662f..61fc5a5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -128,6 +128,7 @@ jobs: name: "unit-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "unit-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true + move_coverage_to_trash: false verbose: ${{ runner.debug == '1' }} - name: DEBUG @@ -142,6 +143,7 @@ jobs: name: "functional-tests-${{ matrix.php-version }}-${{ matrix.symfony-version }}" flags: "functional-tests,php-${{ matrix.php-version }},sf-${{ matrix.symfony-version }}" fail_ci_if_error: true + move_coverage_to_trash: false verbose: ${{ runner.debug == '1' }} - name: DEBUG From 3b8cc65266b7c1a916b31c7caedb17b1117d516d Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 20:27:02 +0200 Subject: [PATCH 08/10] Remove DEBUG --- .github/workflows/CI.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 61fc5a5..3d0bc8d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -105,20 +105,11 @@ jobs: - name: Tests run: make test-unit && make test-functional - - name: DEBUG - if: ${{ env.COVERAGE_TYPE == 'xdebug' }} - run: ls -ail build/coverage-*/ - # Upload to codacy first as codecov action always remove coverage files - # despite the disabled move_coverage_to_trash option - name: Upload coverages to Codacy if: ${{ env.COVERAGE_TYPE == 'xdebug' }} run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial - - name: DEBUG - if: ${{ env.COVERAGE_TYPE == 'xdebug' }} - run: ls -ail build/coverage-*/ - # See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server - name: Upload unit tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} @@ -131,10 +122,6 @@ jobs: move_coverage_to_trash: false verbose: ${{ runner.debug == '1' }} - - name: DEBUG - if: ${{ env.COVERAGE_TYPE == 'xdebug' }} - run: ls -ail build/coverage-*/ - - name: Upload functional tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} uses: codecov/codecov-action@v3 @@ -146,10 +133,6 @@ jobs: move_coverage_to_trash: false verbose: ${{ runner.debug == '1' }} - - name: DEBUG - if: ${{ env.COVERAGE_TYPE == 'xdebug' }} - run: ls -ail build/coverage-*/ - static-checks: name: Static checks runs-on: ubuntu-latest From e67f64b806d8c2eebf4e686b5323d818e6b30f15 Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 20:30:06 +0200 Subject: [PATCH 09/10] retry --- .github/workflows/CI.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3d0bc8d..12f23ca 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -105,11 +105,6 @@ jobs: - name: Tests run: make test-unit && make test-functional - # Upload to codacy first as codecov action always remove coverage files - - name: Upload coverages to Codacy - if: ${{ env.COVERAGE_TYPE == 'xdebug' }} - run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial - # See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server - name: Upload unit tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} @@ -133,6 +128,10 @@ jobs: move_coverage_to_trash: false verbose: ${{ runner.debug == '1' }} + - name: Upload coverages to Codacy + if: ${{ env.COVERAGE_TYPE == 'xdebug' }} + run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial + static-checks: name: Static checks runs-on: ubuntu-latest From 38ed41e54b96706d10f2e02fd2b82dbbaaa3e335 Mon Sep 17 00:00:00 2001 From: Yoanm Date: Sun, 26 Mar 2023 20:33:14 +0200 Subject: [PATCH 10/10] give up --- .github/workflows/CI.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 12f23ca..041c5f1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -105,6 +105,11 @@ jobs: - name: Tests run: make test-unit && make test-functional + # Upload to codacy first as codecov action always remove coverage files despite move_coverage_to_trash at false + - name: Upload coverages to Codacy + if: ${{ env.COVERAGE_TYPE == 'xdebug' }} + run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial + # See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server - name: Upload unit tests coverage to codecov if: ${{ env.COVERAGE_TYPE == 'xdebug' }} @@ -128,10 +133,6 @@ jobs: move_coverage_to_trash: false verbose: ${{ runner.debug == '1' }} - - name: Upload coverages to Codacy - if: ${{ env.COVERAGE_TYPE == 'xdebug' }} - run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial - static-checks: name: Static checks runs-on: ubuntu-latest