From bb164ef87e1e7dd83a458bd709a8fc346dc17dc7 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 4 Jun 2024 10:43:23 +0200 Subject: [PATCH 1/4] fix codecov --- .github/workflows/pull-request.yml | 8 ++++---- .github/workflows/push-develop.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b0d6e2f9e..6f539926b 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -28,17 +28,17 @@ jobs: run: mvn clean verify -ntp -PIT - name: Step 5 - Upload coverage unittests reports to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - gcov_ignore: '!*datasafe-business*' + exclude: '*datasafe-business*' flags: unittests verbose: true - name: Step 6 - Upload coverage e2e tests reports to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - gcov_include: '*datasafe-business*' + exclude: '!*datasafe-business*' flags: e2e_tests verbose: true \ No newline at end of file diff --git a/.github/workflows/push-develop.yml b/.github/workflows/push-develop.yml index cebd686b3..381b4427d 100644 --- a/.github/workflows/push-develop.yml +++ b/.github/workflows/push-develop.yml @@ -37,17 +37,17 @@ jobs: GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }} - name: Step 6 - Upload coverage unittests reports to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - gcov_ignore: '!*datasafe-business*' + exclude: '*datasafe-business*' flags: unittests verbose: true - name: Step 7 - Upload coverage e2e tests reports to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - gcov_include: '*datasafe-business*' + exclude: '!*datasafe-business*' flags: e2e_tests verbose: true \ No newline at end of file From b2a8ebc70231d98a2ce28e857e98984107227c30 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 4 Jun 2024 13:32:42 +0200 Subject: [PATCH 2/4] fix codecov --- .github/workflows/codecov.yml | 14 ++++++++++++++ .github/workflows/pull-request.yml | 17 ++--------------- .github/workflows/push-develop.yml | 17 ++--------------- 3 files changed, 18 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 000000000..da79efcbc --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,14 @@ +name: Develop branch build +on: + workflow_call: + +jobs: + codecov-job: + runs-on: ubuntu-latest + steps: + - name: Upload coverage unittests reports to Codecov + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 6f539926b..17f233560 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -27,18 +27,5 @@ jobs: - name: Step 4 - Build & Test run: mvn clean verify -ntp -PIT - - name: Step 5 - Upload coverage unittests reports to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - exclude: '*datasafe-business*' - flags: unittests - verbose: true - - - name: Step 6 - Upload coverage e2e tests reports to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - exclude: '!*datasafe-business*' - flags: e2e_tests - verbose: true \ No newline at end of file + call-codecov-workflow: + uses: ./.github/workflows/codecov.yml \ No newline at end of file diff --git a/.github/workflows/push-develop.yml b/.github/workflows/push-develop.yml index 381b4427d..38c224df9 100644 --- a/.github/workflows/push-develop.yml +++ b/.github/workflows/push-develop.yml @@ -36,18 +36,5 @@ jobs: GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }} - - name: Step 6 - Upload coverage unittests reports to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - exclude: '*datasafe-business*' - flags: unittests - verbose: true - - - name: Step 7 - Upload coverage e2e tests reports to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - exclude: '!*datasafe-business*' - flags: e2e_tests - verbose: true \ No newline at end of file + call-codecov-workflow: + uses: ./.github/workflows/codecov.yml \ No newline at end of file From 8671960b982a7b074e8165bda46b2483ec4b9e46 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 4 Jun 2024 13:56:58 +0200 Subject: [PATCH 3/4] fix codecov --- .github/workflows/codecov.yml | 4 +++- .github/workflows/pull-request.yml | 3 --- .github/workflows/push-develop.yml | 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index da79efcbc..dc77c294a 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,6 +1,8 @@ name: Develop branch build on: - workflow_call: + workflow_run: + workflows: ["pull-request-job", "develop-build-job"] + types: [completed] jobs: codecov-job: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 17f233560..c15a832e4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -26,6 +26,3 @@ jobs: - name: Step 4 - Build & Test run: mvn clean verify -ntp -PIT - - call-codecov-workflow: - uses: ./.github/workflows/codecov.yml \ No newline at end of file diff --git a/.github/workflows/push-develop.yml b/.github/workflows/push-develop.yml index 38c224df9..6b506d77f 100644 --- a/.github/workflows/push-develop.yml +++ b/.github/workflows/push-develop.yml @@ -35,6 +35,3 @@ jobs: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }} - - call-codecov-workflow: - uses: ./.github/workflows/codecov.yml \ No newline at end of file From f93e0d4630c9559c98baddc9bf0259a0f317752b Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 4 Jun 2024 17:08:36 +0200 Subject: [PATCH 4/4] fix codecov --- .github/workflows/codecov.yml | 16 ---------------- .github/workflows/pull-request.yml | 7 +++++++ .github/workflows/push-develop.yml | 7 +++++++ scripts/mvn_deploy.sh | 2 +- 4 files changed, 15 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index dc77c294a..000000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Develop branch build -on: - workflow_run: - workflows: ["pull-request-job", "develop-build-job"] - types: [completed] - -jobs: - codecov-job: - runs-on: ubuntu-latest - steps: - - name: Upload coverage unittests reports to Codecov - uses: codecov/codecov-action@v4 - with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c15a832e4..d78b6111c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -26,3 +26,10 @@ jobs: - name: Step 4 - Build & Test run: mvn clean verify -ntp -PIT + + - name: Step 5 - Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true diff --git a/.github/workflows/push-develop.yml b/.github/workflows/push-develop.yml index 6b506d77f..46593f695 100644 --- a/.github/workflows/push-develop.yml +++ b/.github/workflows/push-develop.yml @@ -26,6 +26,13 @@ jobs: - name: Step 4 - Build & Test run: mvn clean verify -ntp -PIT + - name: Step 5 - Upload coverage reports to Codecov + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + - name: Step 5 - Deploy Snapshot run: ./scripts/mvn_deploy.sh env: diff --git a/scripts/mvn_deploy.sh b/scripts/mvn_deploy.sh index dbf870f1f..47dfb8067 100755 --- a/scripts/mvn_deploy.sh +++ b/scripts/mvn_deploy.sh @@ -5,4 +5,4 @@ set -e echo "$GPG_SECRET_KEY" | base64 --decode | $GPG_EXECUTABLE --import --no-tty --batch --yes || true echo "$GPG_OWNERTRUST" | base64 --decode | $GPG_EXECUTABLE --import-ownertrust --no-tty --batch --yes || true -mvn clean deploy -ntp --settings scripts/settings.xml gpg:sign -Prelease -DskipTests -U || exit 1 \ No newline at end of file +mvn deploy -ntp --settings scripts/settings.xml gpg:sign -Prelease -DskipTests -U || exit 1 \ No newline at end of file