Skip to content

Commit

Permalink
merge with main
Browse files Browse the repository at this point in the history
Signed-off-by: instamenta <instamenta@abv.bg>
  • Loading branch information
instamenta committed Sep 4, 2024
2 parents bad8c8c + 80639a9 commit 75136ae
Show file tree
Hide file tree
Showing 23 changed files with 1,869 additions and 300 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/flow-build-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,30 @@ jobs:
coverage-subdirectory: ${{ needs.env-vars.outputs.e2e-node-add-test-subdir }}
coverage-report-name: ${{ needs.env-vars.outputs.e2e-node-add-coverage-report }}

e2e-node-update-tests:
name: E2E Tests
uses: ./.github/workflows/zxc-e2e-test.yaml
needs:
- env-vars
- code-style
with:
custom-job-label: Node Update
npm-test-script: test-${{ needs.env-vars.outputs.e2e-node-update-test-subdir }}
coverage-subdirectory: ${{ needs.env-vars.outputs.e2e-node-update-test-subdir }}
coverage-report-name: ${{ needs.env-vars.outputs.e2e-node-update-coverage-report }}

e2e-node-delete-tests:
name: E2E Tests
uses: ./.github/workflows/zxc-e2e-test.yaml
needs:
- env-vars
- code-style
with:
custom-job-label: Node Delete
npm-test-script: test-${{ needs.env-vars.outputs.e2e-node-delete-test-subdir }}
coverage-subdirectory: ${{ needs.env-vars.outputs.e2e-node-delete-test-subdir }}
coverage-report-name: ${{ needs.env-vars.outputs.e2e-node-delete-coverage-report }}

e2e-relay-tests:
name: E2E Tests
if: ${{ github.event_name == 'push' || github.event.inputs.enable-e2e-tests == 'true' }}
Expand All @@ -166,6 +190,8 @@ jobs:
- e2e-node-pfx-kill-tests
- e2e-node-local-build-tests
- e2e-node-add-tests
- e2e-node-update-tests
- e2e-node-delete-tests
- e2e-relay-tests
if: ${{ (github.event_name == 'push' || github.event.inputs.enable-unit-tests == 'true' || github.event.inputs.enable-e2e-tests == 'true') && !failure() && !cancelled() }}
with:
Expand All @@ -180,13 +206,17 @@ jobs:
e2e-node-pfx-kill-test-subdir: ${{ needs.env-vars.outputs.e2e-node-pfx-kill-test-subdir }}
e2e-node-local-build-test-subdir: ${{ needs.env-vars.outputs.e2e-node-local-build-test-subdir }}
e2e-node-add-test-subdir: ${{ needs.env-vars.outputs.e2e-node-add-test-subdir }}
e2e-node-update-test-subdir: ${{ needs.env-vars.outputs.e2e-node-update-test-subdir }}
e2e-node-delete-test-subdir: ${{ needs.env-vars.outputs.e2e-node-delete-test-subdir }}
e2e-relay-test-subdir: ${{ needs.env-vars.outputs.e2e-relay-test-subdir }}
e2e-coverage-report: ${{ needs.env-vars.outputs.e2e-coverage-report }}
e2e-mirror-node-coverage-report: ${{ needs.env-vars.outputs.e2e-mirror-node-coverage-report }}
e2e-node-pem-stop-coverage-report: ${{ needs.env-vars.outputs.e2e-node-pem-stop-coverage-report }}
e2e-node-pfx-kill-coverage-report: ${{ needs.env-vars.outputs.e2e-node-pfx-kill-coverage-report }}
e2e-node-local-build-coverage-report: ${{ needs.env-vars.outputs.e2e-node-local-build-coverage-report }}
e2e-node-add-coverage-report: ${{ needs.env-vars.outputs.e2e-node-add-coverage-report }}
e2e-node-update-coverage-report: ${{ needs.env-vars.outputs.e2e-node-update-coverage-report }}
e2e-node-delete-coverage-report: ${{ needs.env-vars.outputs.e2e-node-delete-coverage-report }}
e2e-relay-coverage-report: ${{ needs.env-vars.outputs.e2e-relay-coverage-report }}
secrets:
snyk-token: ${{ secrets.SNYK_TOKEN }}
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/flow-pull-request-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,30 @@ jobs:
coverage-subdirectory: ${{ needs.env-vars.outputs.e2e-node-add-test-subdir }}
coverage-report-name: ${{ needs.env-vars.outputs.e2e-node-add-coverage-report }}

e2e-node-update-tests:
name: E2E Tests
uses: ./.github/workflows/zxc-e2e-test.yaml
needs:
- env-vars
- code-style
with:
custom-job-label: Node Update
npm-test-script: test-${{ needs.env-vars.outputs.e2e-node-update-test-subdir }}
coverage-subdirectory: ${{ needs.env-vars.outputs.e2e-node-update-test-subdir }}
coverage-report-name: ${{ needs.env-vars.outputs.e2e-node-update-coverage-report }}

e2e-node-delete-tests:
name: E2E Tests
uses: ./.github/workflows/zxc-e2e-test.yaml
needs:
- env-vars
- code-style
with:
custom-job-label: Node Delete
npm-test-script: test-${{ needs.env-vars.outputs.e2e-node-delete-test-subdir }}
coverage-subdirectory: ${{ needs.env-vars.outputs.e2e-node-delete-test-subdir }}
coverage-report-name: ${{ needs.env-vars.outputs.e2e-node-delete-coverage-report }}

e2e-relay-tests:
name: E2E Tests
if: ${{ !cancelled() && always() }}
Expand All @@ -151,6 +175,8 @@ jobs:
- e2e-node-pfx-kill-tests
- e2e-node-local-build-tests
- e2e-node-add-tests
- e2e-node-update-tests
- e2e-node-delete-tests
- e2e-relay-tests
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
with:
Expand All @@ -163,13 +189,17 @@ jobs:
e2e-node-pfx-kill-test-subdir: ${{ needs.env-vars.outputs.e2e-node-pfx-kill-test-subdir }}
e2e-node-local-build-test-subdir: ${{ needs.env-vars.outputs.e2e-node-local-build-test-subdir }}
e2e-node-add-test-subdir: ${{ needs.env-vars.outputs.e2e-node-add-test-subdir }}
e2e-node-update-test-subdir: ${{ needs.env-vars.outputs.e2e-node-update-test-subdir }}
e2e-node-delete-test-subdir: ${{ needs.env-vars.outputs.e2e-node-delete-test-subdir }}
e2e-relay-test-subdir: ${{ needs.env-vars.outputs.e2e-relay-test-subdir }}
e2e-coverage-report: ${{ needs.env-vars.outputs.e2e-coverage-report }}
e2e-mirror-node-coverage-report: ${{ needs.env-vars.outputs.e2e-mirror-node-coverage-report }}
e2e-node-pem-stop-coverage-report: ${{ needs.env-vars.outputs.e2e-node-pem-stop-coverage-report }}
e2e-node-pfx-kill-coverage-report: ${{ needs.env-vars.outputs.e2e-node-pfx-kill-coverage-report }}
e2e-node-local-build-coverage-report: ${{ needs.env-vars.outputs.e2e-node-local-build-coverage-report }}
e2e-node-add-coverage-report: ${{ needs.env-vars.outputs.e2e-node-add-coverage-report }}
e2e-node-update-coverage-report: ${{ needs.env-vars.outputs.e2e-node-update-coverage-report }}
e2e-node-delete-coverage-report: ${{ needs.env-vars.outputs.e2e-node-delete-coverage-report }}
e2e-relay-coverage-report: ${{ needs.env-vars.outputs.e2e-relay-coverage-report }}
secrets:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -186,6 +216,8 @@ jobs:
- e2e-node-pfx-kill-tests
- e2e-node-local-build-tests
- e2e-node-add-tests
- e2e-node-update-tests
- e2e-node-delete-tests
- e2e-relay-tests
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
with:
Expand All @@ -198,13 +230,17 @@ jobs:
e2e-node-pfx-kill-test-subdir: ${{ needs.env-vars.outputs.e2e-node-pfx-kill-test-subdir }}
e2e-node-local-build-test-subdir: ${{ needs.env-vars.outputs.e2e-node-local-build-test-subdir }}
e2e-node-add-test-subdir: ${{ needs.env-vars.outputs.e2e-node-add-test-subdir }}
e2e-node-update-test-subdir: ${{ needs.env-vars.outputs.e2e-node-update-test-subdir }}
e2e-node-delete-test-subdir: ${{ needs.env-vars.outputs.e2e-node-delete-test-subdir }}
e2e-relay-test-subdir: ${{ needs.env-vars.outputs.e2e-relay-test-subdir }}
e2e-coverage-report: ${{ needs.env-vars.outputs.e2e-coverage-report }}
e2e-mirror-node-coverage-report: ${{ needs.env-vars.outputs.e2e-mirror-node-coverage-report }}
e2e-node-pem-stop-coverage-report: ${{ needs.env-vars.outputs.e2e-node-pem-stop-coverage-report }}
e2e-node-pfx-kill-coverage-report: ${{ needs.env-vars.outputs.e2e-node-pfx-kill-coverage-report }}
e2e-node-local-build-coverage-report: ${{ needs.env-vars.outputs.e2e-node-local-build-coverage-report }}
e2e-node-add-coverage-report: ${{ needs.env-vars.outputs.e2e-node-add-coverage-report }}
e2e-node-update-coverage-report: ${{ needs.env-vars.outputs.e2e-node-update-coverage-report }}
e2e-node-delete-coverage-report: ${{ needs.env-vars.outputs.e2e-node-delete-coverage-report }}
e2e-relay-coverage-report: ${{ needs.env-vars.outputs.e2e-relay-coverage-report }}
secrets:
codacy-project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
Expand All @@ -221,6 +257,8 @@ jobs:
# - e2e-node-pfx-kill-tests
# - e2e-node-local-build-tests
# - e2e-node-add-tests
# - e2e-node-update-tests
# - e2e-node-delete-tests
# - e2e-relay-tests
# if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && github.actor != 'dependabot[bot]' }}
# with:
Expand All @@ -232,13 +270,17 @@ jobs:
# e2e-node-pfx-kill-test-subdir: ${{ needs.env-vars.outputs.e2e-node-pfx-kill-test-subdir }}
# e2e-node-local-build-test-subdir: ${{ needs.env-vars.outputs.e2e-node-local-build-test-subdir }}
# e2e-node-add-test-subdir: ${{ needs.env-vars.outputs.e2e-node-add-test-subdir }}
# e2e-node-update-test-subdir: ${{ needs.env-vars.outputs.e2e-node-update-test-subdir }}
# e2e-node-delete-test-subdir: ${{ needs.env-vars.outputs.e2e-node-delete-test-subdir }}
# e2e-relay-test-subdir: ${{ needs.env-vars.outputs.e2e-relay-test-subdir }}
# e2e-coverage-report: ${{ needs.env-vars.outputs.e2e-coverage-report }}
# e2e-mirror-node-coverage-report: ${{ needs.env-vars.outputs.e2e-mirror-node-coverage-report }}
# e2e-node-pem-stop-coverage-report: ${{ needs.env-vars.outputs.e2e-node-pem-stop-coverage-report }}
# e2e-node-pfx-kill-coverage-report: ${{ needs.env-vars.outputs.e2e-node-pfx-kill-coverage-report }}
# e2e-node-local-build-coverage-report: ${{ needs.env-vars.outputs.e2e-node-local-build-coverage-report }}
# e2e-node-add-coverage-report: ${{ needs.env-vars.outputs.e2e-node-add-coverage-report }}
# e2e-node-update-coverage-report: ${{ needs.env-vars.outputs.e2e-node-update-coverage-report }}
# e2e-node-delete-coverage-report: ${{ needs.env-vars.outputs.e2e-node-delete-coverage-report }}
# e2e-relay-coverage-report: ${{ needs.env-vars.outputs.e2e-relay-coverage-report }}
# secrets:
# snyk-token: ${{ secrets.SNYK_TOKEN }}
36 changes: 35 additions & 1 deletion .github/workflows/zxc-code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ on:
type: string
required: false
default: "e2e-node-add"
e2e-node-update-test-subdir:
description: "E2E Node Update Test Subdirectory:"
type: string
required: false
default: "e2e-node-update"
e2e-node-delete-test-subdir:
description: "E2E Node Delete Test Subdirectory:"
type: string
required: false
default: "e2e-node-delete"
e2e-relay-test-subdir:
description: "E2E Relay Test Subdirectory:"
type: string
Expand Down Expand Up @@ -120,6 +130,16 @@ on:
type: string
required: false
default: "E2E Node Add Tests Coverage Report"
e2e-node-update-coverage-report:
description: "E2E Node Update Coverage Report:"
type: string
required: false
default: "E2E Node Update Tests Coverage Report"
e2e-node-delete-coverage-report:
description: "E2E Node Delete Coverage Report:"
type: string
required: false
default: "E2E Node Delete Tests Coverage Report"
e2e-relay-coverage-report:
description: "E2E Relay Coverage Report:"
type: string
Expand Down Expand Up @@ -224,6 +244,20 @@ jobs:
name: ${{ inputs.e2e-node-add-coverage-report }}
path: 'coverage/${{ inputs.e2e-node-add-test-subdir }}'

- name: Download E2E Update Coverage Report
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
if: ${{ (inputs.enable-codecov-analysis || inputs.enable-codacy-coverage) && inputs.enable-e2e-coverage-report && !cancelled() && !failure() }}
with:
name: ${{ inputs.e2e-node-udpate-coverage-report }}
path: 'coverage/${{ inputs.e2e-udpate-add-test-subdir }}'

- name: Download E2E Delete Coverage Report
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
if: ${{ (inputs.enable-codecov-analysis || inputs.enable-codacy-coverage) && inputs.enable-e2e-coverage-report && !cancelled() && !failure() }}
with:
name: ${{ inputs.e2e-node-delete-coverage-report }}
path: 'coverage/${{ inputs.e2e-node-delete-test-subdir }}'

- name: Publish To Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
if: ${{ inputs.enable-codecov-analysis && !cancelled() && !failure() }}
Expand Down Expand Up @@ -291,7 +325,7 @@ jobs:
echo "::endgroup::"
- name: Publish Snyk Reports
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: ${{ inputs.enable-snyk-scan && !cancelled() && !failure() }}
with:
name: Snyk Reports
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/zxc-e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,23 +147,23 @@ jobs:
run: docker image pull kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72

- name: Setup Java
if: ${{ runner.os == 'linux' && inputs.npm-test-script == 'test-e2e-node-local-build' && !cancelled() && !failure() }}
if: ${{ runner.os == 'linux' && (inputs.npm-test-script == 'test-e2e-node-local-build' || inputs.npm-test-script == 'test-e2e-node-add') && !cancelled() && !failure() }}
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
distribution: temurin
java-version: 21.0.1

- name: Setup Gradle
if: ${{ runner.os == 'linux' && inputs.npm-test-script == 'test-e2e-node-local-build' && !cancelled() && !failure() }}
if: ${{ runner.os == 'linux' && (inputs.npm-test-script == 'test-e2e-node-local-build' || inputs.npm-test-script == 'test-e2e-node-add') && !cancelled() && !failure() }}
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
with:
cache-read-only: false

- name: Build Hedera code locally
if: ${{ runner.os == 'linux' && inputs.npm-test-script == 'test-e2e-node-local-build' && !cancelled() && !failure() }}
if: ${{ runner.os == 'linux' && (inputs.npm-test-script == 'test-e2e-node-local-build' || inputs.npm-test-script == 'test-e2e-node-add') && !cancelled() && !failure() }}
run: |
cd ..
git clone https://github.com/hashgraph/hedera-services.git
git clone https://github.com/hashgraph/hedera-services.git --branch v0.53.2
cd hedera-services
ls -ltr
${{ env.CG_EXEC }} ./gradlew assemble --stacktrace --info
Expand All @@ -186,7 +186,7 @@ jobs:
- name: Upload E2E Logs to GitHub
if: ${{ !cancelled() }}
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: solo-${{ inputs.npm-test-script }}.log
path: ~/.solo/logs/*
Expand All @@ -202,7 +202,7 @@ jobs:
files: "junit-${{ inputs.coverage-subdirectory }}.xml"

- name: Publish E2E Coverage Report
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: ${{ !cancelled() }}
with:
name: ${{ inputs.coverage-report-name }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/zxc-env-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ on:
e2e-node-add-test-subdir:
description: "E2E Node Add Test Subdirectory"
value: ${{ jobs.env-vars.outputs.e2e_node_add_test_subdir }}
e2e-node-update-test-subdir:
description: "E2E Node Update Test Subdirectory"
value: ${{ jobs.env-vars.outputs.e2e_node_update_test_subdir }}
e2e-node-delete-test-subdir:
description: "E2E Node Delete Test Subdirectory"
value: ${{ jobs.env-vars.outputs.e2e_node_delete_test_subdir }}
e2e-relay-test-subdir:
description: "E2E Relay Test Subdirectory"
value: ${{ jobs.env-vars.outputs.e2e_relay_test_subdir }}
Expand All @@ -65,6 +71,12 @@ on:
e2e-node-add-coverage-report:
description: "E2E Node Add Tests Coverage Report"
value: ${{ jobs.env-vars.outputs.e2e_node_add_coverage_report }}
e2e-node-update-coverage-report:
description: "E2E Node Update Tests Coverage Report"
value: ${{ jobs.env-vars.outputs.e2e_node_update_coverage_report }}
e2e-node-delete-coverage-report:
description: "E2E Node Delete Tests Coverage Report"
value: ${{ jobs.env-vars.outputs.e2e_node_delete_coverage_report }}
e2e-relay-coverage-report:
description: "E2E Relay Tests Coverage Report"
value: ${{ jobs.env-vars.outputs.e2e_relay_coverage_report }}
Expand All @@ -84,13 +96,17 @@ jobs:
e2e_node_pfx_kill_test_subdir: e2e-node-pfx-kill
e2e_node_local_build_test_subdir: e2e-node-local-build
e2e_node_add_test_subdir: e2e-node-add
e2e_node_update_test_subdir: e2e-node-update
e2e_node_delete_test_subdir: e2e-node-delete
e2e_relay_test_subdir: e2e-relay
e2e_coverage_report: "E2E Tests Coverage Report"
e2e_mirror_node_coverage_report: "E2E Mirror Node Tests Coverage Report"
e2e_node_pem_stop_coverage_report: "E2E Node PEM Stop Tests Coverage Report"
e2e_node_pfx_kill_coverage_report: "E2E Node PFX Kill Tests Coverage Report"
e2e_node_local_build_coverage_report: "E2E Node Local Build Tests Coverage Report"
e2e_node_add_coverage_report: "E2E Node Add Tests Coverage Report"
e2e_node_update_coverage_report: "E2E Node Update Tests Coverage Report"
e2e_node_delete_coverage_report: "E2E Node Delete Tests Coverage Report"
e2e_relay_coverage_report: "E2E Relay Tests Coverage Report"
steps:
- run: echo "Exposing environment variables to reusable workflows"
4 changes: 2 additions & 2 deletions .github/workflows/zxc-unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ jobs:
files: "junit.xml"

- name: Publish Unit Test Coverage Report
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: ${{ runner.os == 'linux' && !cancelled() }}
with:
name: Unit Test Coverage Report
path: 'coverage/unit'

- name: Publish Test Reports
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: ${{ runner.os == 'linux' && steps.npm-deps.conclusion == 'success' && !cancelled() }}
with:
name: Test Reports
Expand Down
Loading

0 comments on commit 75136ae

Please sign in to comment.