From c325e498bf606357a3fa40a559cde9b68fabc4af Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Tue, 22 Aug 2023 09:53:09 +0200 Subject: [PATCH 1/2] Use Github Actions function instead of bash script Signed-off-by: Benjamin Brahmer --- .github/workflows/api-php-tests.yml | 11 ++++++++--- .github/workflows/post-merge-tasks.yml | 8 ++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/api-php-tests.yml b/.github/workflows/api-php-tests.yml index 9dbb20d8fc..aca35414e5 100644 --- a/.github/workflows/api-php-tests.yml +++ b/.github/workflows/api-php-tests.yml @@ -53,12 +53,17 @@ jobs: - name: Prep PHP tests working-directory: ../server/apps/news run: make php-test-dependencies + - name: Unittests working-directory: ../server/apps/news run: make unit-test env: CODECOVERAGE: ${{ matrix.codecoverage }} - - name: Upload codecoverage + + - name: Upload codecoverage to codecov if: ${{ matrix.codecoverage }} - working-directory: ../server/apps/news - run: bash <(curl -s https://codecov.io/bash) -f build/php-unit.clover -N ${{ github.sha }} + uses: codecov/codecov-action@v3 + with: + files: ../server/apps/news/build/php-unit.clover + flags: unittests + verbose: true \ No newline at end of file diff --git a/.github/workflows/post-merge-tasks.yml b/.github/workflows/post-merge-tasks.yml index b7447a4dd0..90bc29c955 100644 --- a/.github/workflows/post-merge-tasks.yml +++ b/.github/workflows/post-merge-tasks.yml @@ -47,5 +47,9 @@ jobs: env: CODECOVERAGE: ${{ matrix.codecoverage }} - - name: Upload codecoverage - run: cd ../server/apps/news && bash <(curl -s https://codecov.io/bash) -f build/php-unit.clover + - name: Upload codecoverage to codecov + uses: codecov/codecov-action@v3 + with: + files: ../server/apps/news/build/php-unit.clover + flags: unittests + verbose: true From a5ec795e7ee55b50a3f63e1249c3fba4fcd0a1af Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Tue, 22 Aug 2023 10:53:27 +0200 Subject: [PATCH 2/2] switch back to script Signed-off-by: Benjamin Brahmer --- .github/workflows/api-php-tests.yml | 7 ++----- .github/workflows/post-merge-tasks.yml | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/api-php-tests.yml b/.github/workflows/api-php-tests.yml index aca35414e5..37dbadae62 100644 --- a/.github/workflows/api-php-tests.yml +++ b/.github/workflows/api-php-tests.yml @@ -62,8 +62,5 @@ jobs: - name: Upload codecoverage to codecov if: ${{ matrix.codecoverage }} - uses: codecov/codecov-action@v3 - with: - files: ../server/apps/news/build/php-unit.clover - flags: unittests - verbose: true \ No newline at end of file + working-directory: ../server/apps/news + run: bash <(curl -s https://codecov.io/bash) -f build/php-unit.clover \ No newline at end of file diff --git a/.github/workflows/post-merge-tasks.yml b/.github/workflows/post-merge-tasks.yml index 90bc29c955..1ad77d6968 100644 --- a/.github/workflows/post-merge-tasks.yml +++ b/.github/workflows/post-merge-tasks.yml @@ -48,8 +48,5 @@ jobs: CODECOVERAGE: ${{ matrix.codecoverage }} - name: Upload codecoverage to codecov - uses: codecov/codecov-action@v3 - with: - files: ../server/apps/news/build/php-unit.clover - flags: unittests - verbose: true + working-directory: ../server/apps/news + run: bash <(curl -s https://codecov.io/bash) -f build/php-unit.clover