44 branches :
55 - master
66 - ' rel/**'
7+ workflow_dispatch :
8+ inputs :
9+ branch :
10+ description : ' Branch to run tests on'
11+ required : true
12+ default : ' master'
13+ type : string
714
815env :
916 CODECOV_TOKEN : " 8b4a1f91-f154-4c26-b84c-c9aaa90159c6" # Same public token from CircleCI config
1017 ALGORAND_DEADLOCK : enable
1118 KMD_NOUSB : True
1219 BUILD_TYPE : integration
1320 ALGOTEST : 1
21+ SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
1422
1523concurrency :
1624 group : nightly-${{ github.ref }}
3139 - name : Checkout code
3240 uses : actions/checkout@v4
3341 with :
42+ ref : ${{ github.event.inputs.branch || github.ref }}
3443 fetch-depth : 0
3544 - name : Get Go version
3645 id : go_version
5968 path : /tmp/workspace-${{ matrix.platform }}.tar.gz
6069 retention-days : 1
6170 - name : Notify Slack on failure
62- if : failure()
71+ if : failure() && env.SLACK_WEBHOOK != ''
6372 uses : slackapi/slack-github-action@v2.1.0
6473 with :
6574 webhook : ${{ secrets.SLACK_WEBHOOK }}
@@ -84,11 +93,11 @@ jobs:
8493 fail-fast : false
8594 matrix :
8695 platform : ["ubuntu-24.04", "ubuntu-24.04-arm", "macos-14"]
87- partition_id : [0, 1, 2, 3, 4, 5, 6, 7 ] # set PARTITION_TOTAL below to match
96+ partition_id : [0, 1] # set PARTITION_TOTAL below to match
8897 runs-on : ${{ matrix.platform }}
8998 env :
9099 PARTITION_ID : ${{ matrix.partition_id }}
91- PARTITION_TOTAL : 8
100+ PARTITION_TOTAL : 2
92101 CIRCLECI : true
93102 steps :
94103 - name : Download workspace archive
@@ -123,7 +132,7 @@ jobs:
123132 -race -timeout 1h -coverprofile=coverage.txt -covermode=atomic -p 1 \
124133 $PACKAGE_NAMES
125134 - name : Notify Slack on failure
126- if : failure()
135+ if : failure() && env.SLACK_WEBHOOK != ''
127136 uses : slackapi/slack-github-action@v2.1.0
128137 with :
129138 webhook : ${{ secrets.SLACK_WEBHOOK }}
@@ -141,15 +150,15 @@ jobs:
141150 }
142151 ]
143152 }
144- - name : Upload test results
153+ - name : Upload test artifacts to GitHub
145154 uses : actions/upload-artifact@v4
146155 with :
147156 name : test-results-${{ matrix.platform }}-${{ github.run_id }}-${{ matrix.partition_id }}
148157 path : ~/test_results
149158 retention-days : 7
150159 - name : Upload coverage
151160 # Only upload coverage from ubuntu-24.04 platform
152- if : matrix.platform == 'ubuntu-24.04'
161+ if : matrix.platform == 'ubuntu-24.04' && ${{ !cancelled() }}
153162 uses : codecov/codecov-action@v4
154163 env :
155164 GITHUB_ACTIONS : True
@@ -158,21 +167,28 @@ jobs:
158167 token : ${{ env.CODECOV_TOKEN }}
159168 file : ./coverage.txt
160169 fail_ci_if_error : false
170+ - name : Upload test results to Codecov
171+ if : ${{ !cancelled() }}
172+ uses : codecov/test-results-action@v1
173+ with :
174+ file : ${{ matrix.platform == 'macos-14' && '/Users/runner' || '/home/runner' }}/test_results/${{ matrix.platform }}_test_nightly/${{ matrix.partition_id }}/results.xml
175+ token : ${{ env.CODECOV_TOKEN }}
176+ fail_ci_if_error : false
161177
162178 integration_nightly :
163179 needs : [build]
164180 strategy :
165181 fail-fast : false
166182 matrix :
167183 platform : ["ubuntu-24.04", "ubuntu-24.04-arm", "macos-14"]
168- partition_id : [0, 1, 2, 3, 4, 5, 6, 7 ] # set PARTITION_TOTAL below to match
184+ partition_id : [0, 1] # set PARTITION_TOTAL below to match
169185 runs-on : ${{ matrix.platform }}
170186 env :
171187 CIRCLECI : true
172188 PARTITION_ID : ${{ matrix.partition_id }}
173- PARTITION_TOTAL : 8
189+ PARTITION_TOTAL : 2
174190 E2E_TEST_FILTER : GO
175- PARALLEL_FLAG : " -p 1 "
191+ PARALLEL_FLAG : " -p 4 "
176192 steps :
177193 - name : Download workspace archive
178194 uses : actions/download-artifact@v4
@@ -200,7 +216,7 @@ jobs:
200216 TEST_RESULTS=~/test_results/${{ matrix.platform }}_integration_nightly/${PARTITION_ID} \
201217 test/scripts/run_integration_tests.sh
202218 - name : Notify Slack on failure
203- if : failure()
219+ if : failure() && env.SLACK_WEBHOOK != ''
204220 uses : slackapi/slack-github-action@v2.1.0
205221 with :
206222 webhook : ${{ secrets.SLACK_WEBHOOK }}
@@ -218,12 +234,19 @@ jobs:
218234 }
219235 ]
220236 }
221- - name : Upload test results
237+ - name : Upload test artifacts to GitHub
222238 uses : actions/upload-artifact@v4
223239 with :
224240 name : integration-results-${{ matrix.platform }}-${{ github.run_id }}-${{ matrix.partition_id }}
225241 path : ~/test_results
226242 retention-days : 7
243+ - name : Upload test results to Codecov
244+ if : ${{ !cancelled() }}
245+ uses : codecov/test-results-action@v1
246+ with :
247+ file : ${{ matrix.platform == 'macos-14' && '/Users/runner' || '/home/runner' }}/test_results/${{ matrix.platform }}_integration_nightly/${{ matrix.partition_id }}/results.xml
248+ token : ${{ env.CODECOV_TOKEN }}
249+ fail_ci_if_error : false
227250
228251 e2e_expect_nightly :
229252 needs : [build]
@@ -238,7 +261,7 @@ jobs:
238261 PARTITION_ID : ${{ matrix.partition_id }}
239262 PARTITION_TOTAL : 2
240263 E2E_TEST_FILTER : EXPECT
241- PARALLEL_FLAG : " -p 1 "
264+ PARALLEL_FLAG : " -p 4 "
242265 steps :
243266 - name : Download workspace archive
244267 uses : actions/download-artifact@v4
@@ -266,7 +289,7 @@ jobs:
266289 TEST_RESULTS=~/test_results/${{ matrix.platform }}_e2e_expect_nightly/${PARTITION_ID} \
267290 test/scripts/run_integration_tests.sh
268291 - name : Notify Slack on failure
269- if : failure()
292+ if : failure() && env.SLACK_WEBHOOK != ''
270293 uses : slackapi/slack-github-action@v2.1.0
271294 with :
272295 webhook : ${{ secrets.SLACK_WEBHOOK }}
@@ -284,12 +307,19 @@ jobs:
284307 }
285308 ]
286309 }
287- - name : Upload test results
310+ - name : Upload test artifacts to GitHub
288311 uses : actions/upload-artifact@v4
289312 with :
290313 name : e2e_expect-results-${{ matrix.platform }}-${{ github.run_id }}-${{ matrix.partition_id }}
291314 path : ~/test_results
292315 retention-days : 7
316+ - name : Upload test results to Codecov
317+ if : ${{ !cancelled() }}
318+ uses : codecov/test-results-action@v1
319+ with :
320+ file : ${{ matrix.platform == 'macos-14' && '/Users/runner' || '/home/runner' }}/test_results/${{ matrix.platform }}_e2e_expect_nightly/${{ matrix.partition_id }}/results.xml
321+ token : ${{ env.CODECOV_TOKEN }}
322+ fail_ci_if_error : false
293323
294324 e2e_subs_nightly :
295325 needs : [build]
@@ -336,7 +366,7 @@ jobs:
336366 TEST_RESULTS=~/test_results/${{ matrix.platform }}_e2e_subs_nightly \
337367 test/scripts/run_integration_tests.sh
338368 - name : Notify Slack on failure
339- if : failure()
369+ if : failure() && env.SLACK_WEBHOOK != ''
340370 uses : slackapi/slack-github-action@v2.1.0
341371 with :
342372 webhook : ${{ secrets.SLACK_WEBHOOK }}
@@ -354,7 +384,7 @@ jobs:
354384 }
355385 ]
356386 }
357- - name : Upload test results
387+ - name : Upload test artifacts to GitHub
358388 uses : actions/upload-artifact@v4
359389 with :
360390 name : e2e_subs-results-${{ matrix.platform }}-${{ github.run_id }}
@@ -387,7 +417,7 @@ jobs:
387417 TestGoalWithExpect \
388418 TestTealdbgWithExpect
389419 - name : Notify Slack on failure
390- if : failure()
420+ if : failure() && env.SLACK_WEBHOOK != ''
391421 uses : slackapi/slack-github-action@v2.1.0
392422 with :
393423 webhook : ${{ secrets.SLACK_WEBHOOK }}
@@ -408,6 +438,7 @@ jobs:
408438
409439 upload :
410440 needs : [verify_nightly, e2e_subs_nightly]
441+ if : github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/rel/')
411442 strategy :
412443 matrix :
413444 platform : ["ubuntu-24.04", "ubuntu-24.04-arm", "macos-14"]
@@ -443,7 +474,7 @@ jobs:
443474 scripts/travis/deploy_packages.sh
444475 shell : bash
445476 - name : Notify Slack on failure
446- if : failure()
477+ if : failure() && env.SLACK_WEBHOOK != ''
447478 uses : slackapi/slack-github-action@v2.1.0
448479 with :
449480 webhook : ${{ secrets.SLACK_WEBHOOK }}
0 commit comments