-
Notifications
You must be signed in to change notification settings - Fork 143
168 lines (154 loc) · 6.9 KB
/
zxf-dry-run-extended-test-suite.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
##
# Copyright (C) 2023-2024 Hedera Hashgraph, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##
name: "ZXF: Extended Test Suite - Dry Run"
on:
workflow_dispatch:
inputs:
commit_sha:
required: true
description: 'The commit sha to check out'
branch_name:
required: true
description: 'The branch name, for JRS Panel output'
permissions:
id-token: write
actions: write
pull-requests: write
statuses: write
checks: write
contents: read
defaults:
run:
shell: bash
jobs:
# extended-test-suite:
# name: Execute eXtended Test Suite
# uses: ./.github/workflows/node-zxc-compile-application-code.yaml
# with:
# custom-job-label: Execute eXtended Test Suite
# enable-timing-sensitive-tests: true
# enable-time-consuming-tests: true
# enable-hammer-tests: true
# enable-hapi-tests-time-consuming: true
# enable-network-log-capture: true
# ref: ${{ inputs.commit_sha }}
# secrets:
# access-token: ${{ secrets.GITHUB_TOKEN }}
# gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
# gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
publish-unit-tests-to-codacy:
name: Publish Unit Tests Results to Codacy (commit merged by PR and XTS)
runs-on: network-node-linux-medium
# needs: extended-test-suite
# if: ${{ needs.extended-test-suite.result == 'success' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: '0'
ref: develop
token: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Find the latest build application workflow run ID # Which was started by a push to develop branch event
id: find-build-application-workflow-id
env:
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: |
LATEST_BUILD_APPLICATION_RUN_ID=$(gh run list --workflow node-flow-build-application.yaml --branch develop --event push --limit 1 | grep -o '[0-9]\{10,\}')
echo "latest-build-application-run-id=${LATEST_BUILD_APPLICATION_RUN_ID}" >> $GITHUB_OUTPUT
- name: Pull in unit test artifact from build application workflow
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: "Unit Test Report"
run-id: ${{ steps.find-build-application-workflow-id.outputs.latest-build-application-run-id }}
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
path: downloaded_artifacts
# - name: Pull in XTS Unit Test artifact
# uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
# with:
# name: "Unit Test Report (Timing Sensitive)"
# path: downloaded_artifacts_xts
# find . -path '*/build/test-results/timingSensitive/*' -name 'TEST-*.xml' | tr '\n' ','
- name: Resolve coverage file paths
id: coverage_paths
run: |
echo "COVERAGE_REPORTS=$(find . -path './downloaded_artifacts/hapi/build/test-results/test/*' -name 'TEST-*.xml'| tr '\n' ',')" >> $GITHUB_ENV
- name: Publish to Codacy
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
COVERAGE_REPORTS="${{ env.COVERAGE_REPORTS }}"
IFS=','
for report in $COVERAGE_REPORTS; do
echo "Processing report: $report"
source <(curl -Ls https://coverage.codacy.com/get.sh) report -l Java -r $report --partial >/dev/null
done
unset IFS
source <(curl -Ls https://coverage.codacy.com/get.sh) final
# - name: Publish to codacy
# uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0
# with:
# project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# coverage-reports: "downloaded_artifacts/**/TEST-*.xml"
# language: Java
# coverage-reports: '*/build/test-results/test/TEST-*.xml'
# abbreviated-panel:
# name: JRS Panel
# uses: ./.github/workflows/zxc-jrs-regression.yaml
# with:
# custom-job-name: "Platform SDK"
# panel-config: "configs/suites/GCP-PRCheck-Abbrev-4N.json"
# ref: ${{ inputs.commit_sha }}
# branch-name: ${{ inputs.branch_name }}
# base-branch-name: ${{ inputs.branch_name }}
# slack-results-channel: "regression-test"
# slack-summary-channel: "regression-test"
# use-branch-for-slack-channel: false
# secrets:
# access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
# gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
# gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
# jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
# jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
# gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
# gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
# slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
# grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
# grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}
# hedera-node-jrs-panel:
# name: Hedera Node JRS Panel
# uses: ./.github/workflows/zxc-jrs-regression.yaml
# with:
# custom-job-name: "Abbrev Update Test"
# ref: ${{ inputs.commit_sha }}
# branch-name: ${{ inputs.branch_name }}
# hedera-tests-enabled: true
# use-branch-for-slack-channel: false
# panel-config: "configs/services/suites/daily/GCP-Daily-Services-Abbrev-DAB-Update-4N-2C.json"
# secrets:
# access-token: ${{ secrets.PLATFORM_GH_ACCESS_TOKEN }}
# jrs-ssh-user-name: ${{ secrets.PLATFORM_JRS_SSH_USER_NAME }}
# jrs-ssh-key-file: ${{ secrets.PLATFORM_JRS_SSH_KEY_FILE }}
# gcp-project-number: ${{ secrets.PLATFORM_GCP_PROJECT_NUMBER }}
# gcp-sa-key-contents: ${{ secrets.PLATFORM_GCP_KEY_FILE }}
# slack-api-token: ${{ secrets.PLATFORM_SLACK_API_TOKEN }}
# gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
# gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
# grafana-agent-username: ${{ secrets.GRAFANA_AGENT_USERNAME }}
# grafana-agent-password: ${{ secrets.GRAFANA_AGENT_PASSWORD }}