Skip to content

Commit e0b68fb

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pavel/ws-relays
2 parents 0f6962c + 94de30f commit e0b68fb

File tree

42 files changed

+1573
-1407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1573
-1407
lines changed

.github/workflows/ci-nightly.yml

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@ on:
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

815
env:
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

1523
concurrency:
1624
group: nightly-${{ github.ref }}
@@ -31,6 +39,7 @@ jobs:
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
@@ -59,7 +68,7 @@ jobs:
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 }}

.github/workflows/ci-pr.yml

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
PARTITION_ID: ${{ matrix.partition_id }}
9090
PARTITION_TOTAL: 4
9191
CIRCLECI: true
92-
SHORT_TEST_FLAG: "-short"
92+
SHORTTEST: "-short"
9393
steps:
9494
- name: Download workspace archive
9595
uses: actions/download-artifact@v4
@@ -119,8 +119,8 @@ jobs:
119119
gotestsum --format standard-verbose \
120120
--junitfile ~/test_results/${{ matrix.platform }}_test/${PARTITION_ID}/results.xml \
121121
--jsonfile ~/test_results/${{ matrix.platform }}_test/${PARTITION_ID}/testresults.json \
122-
-- --tags "sqlite_unlock_notify sqlite_omit_load_extension" $SHORT_TEST_FLAG \
123-
-race -timeout 1h -coverprofile=coverage.txt -covermode=atomic -p 1 \
122+
-- --tags "sqlite_unlock_notify sqlite_omit_load_extension" $SHORTTEST \
123+
-race -timeout 1h -coverprofile=coverage.txt -covermode=atomic -p 4 \
124124
$PACKAGE_NAMES
125125
- name: Notify Slack on failure
126126
if: failure() && env.SLACK_WEBHOOK != ''
@@ -141,15 +141,15 @@ jobs:
141141
}
142142
]
143143
}
144-
- name: Upload test results
144+
- name: Upload test artifacts to GitHub
145145
uses: actions/upload-artifact@v4
146146
with:
147147
name: test-results-${{ matrix.platform }}-${{ github.run_id }}-${{ matrix.partition_id }}
148148
path: ~/test_results
149149
retention-days: 7
150150
- name: Upload coverage
151151
# Only upload coverage from ubuntu-24.04 platform
152-
if: matrix.platform == 'ubuntu-24.04'
152+
if: matrix.platform == 'ubuntu-24.04' && ${{ !cancelled() }}
153153
uses: codecov/codecov-action@v4
154154
env:
155155
GITHUB_ACTIONS: True
@@ -158,22 +158,29 @@ jobs:
158158
token: ${{ env.CODECOV_TOKEN }}
159159
file: ./coverage.txt
160160
fail_ci_if_error: false
161+
- name: Upload test results to Codecov
162+
if: ${{ !cancelled() }}
163+
uses: codecov/test-results-action@v1
164+
with:
165+
file: ${{ matrix.platform == 'macos-14' && '/Users/runner' || '/home/runner' }}/test_results/${{ matrix.platform }}_test/${{ matrix.partition_id }}/results.xml
166+
token: ${{ env.CODECOV_TOKEN }}
167+
fail_ci_if_error: false
161168

162169
integration:
163170
needs: [build]
164171
strategy:
165172
fail-fast: false
166173
matrix:
167174
platform: ["ubuntu-24.04"]
168-
partition_id: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] # set PARTITION_TOTAL below to match
175+
partition_id: [0, 1, 2, 3] # set PARTITION_TOTAL below to match
169176
runs-on: ${{ matrix.platform }}
170177
env:
171178
CIRCLECI: true
172179
PARTITION_ID: ${{ matrix.partition_id }}
173-
PARTITION_TOTAL: 16
180+
PARTITION_TOTAL: 4
174181
E2E_TEST_FILTER: GO
175-
PARALLEL_FLAG: "-p 1"
176-
SHORT_TEST_FLAG: "-short"
182+
PARALLEL_FLAG: "-p 4"
183+
SHORTTEST: "-short"
177184
steps:
178185
- name: Download workspace archive
179186
uses: actions/download-artifact@v4
@@ -219,28 +226,35 @@ jobs:
219226
}
220227
]
221228
}
222-
- name: Upload test results
229+
- name: Upload test artifacts to GitHub
223230
uses: actions/upload-artifact@v4
224231
with:
225232
name: integration-results-${{ matrix.platform }}-${{ github.run_id }}-${{ matrix.partition_id }}
226233
path: ~/test_results
227234
retention-days: 7
235+
- name: Upload test results to Codecov
236+
if: ${{ !cancelled() }}
237+
uses: codecov/test-results-action@v1
238+
with:
239+
file: ${{ matrix.platform == 'macos-14' && '/Users/runner' || '/home/runner' }}/test_results/${{ matrix.platform }}_integration/${{ matrix.partition_id }}/results.xml
240+
token: ${{ env.CODECOV_TOKEN }}
241+
fail_ci_if_error: false
228242

229243
e2e_expect:
230244
needs: [build]
231245
strategy:
232246
fail-fast: false
233247
matrix:
234248
platform: ["ubuntu-24.04"]
235-
partition_id: [0, 1, 2, 3] # set PARTITION_TOTAL below to match
249+
partition_id: [0, 1, 2, 3, 4, 5, 6, 7] # set PARTITION_TOTAL below to match
236250
runs-on: ${{ matrix.platform }}
237251
env:
238252
CIRCLECI: true
239253
PARTITION_ID: ${{ matrix.partition_id }}
240-
PARTITION_TOTAL: 4
254+
PARTITION_TOTAL: 8
241255
E2E_TEST_FILTER: EXPECT
242-
PARALLEL_FLAG: "-p 1"
243-
SHORT_TEST_FLAG: "-short"
256+
PARALLEL_FLAG: "-p 4"
257+
SHORTTEST: "-short"
244258
steps:
245259
- name: Download workspace archive
246260
uses: actions/download-artifact@v4
@@ -286,12 +300,19 @@ jobs:
286300
}
287301
]
288302
}
289-
- name: Upload test results
303+
- name: Upload test artifacts to GitHub
290304
uses: actions/upload-artifact@v4
291305
with:
292306
name: e2e_expect-results-${{ matrix.platform }}-${{ github.run_id }}-${{ matrix.partition_id }}
293307
path: ~/test_results
294308
retention-days: 7
309+
- name: Upload test results to Codecov
310+
if: ${{ !cancelled() }}
311+
uses: codecov/test-results-action@v1
312+
with:
313+
file: ${{ matrix.platform == 'macos-14' && '/Users/runner' || '/home/runner' }}/test_results/${{ matrix.platform }}_e2e_expect/${{ matrix.partition_id }}/results.xml
314+
token: ${{ env.CODECOV_TOKEN }}
315+
fail_ci_if_error: false
295316

296317
e2e_subs:
297318
needs: [build]
@@ -304,7 +325,7 @@ jobs:
304325
E2E_TEST_FILTER: SCRIPTS
305326
CI_PLATFORM: ${{ matrix.platform }}
306327
CI_KEEP_TEMP_PLATFORM: ""
307-
SHORT_TEST_FLAG: "-short"
328+
SHORTTEST: "-short"
308329
steps:
309330
- name: Download workspace archive
310331
uses: actions/download-artifact@v4
@@ -350,7 +371,7 @@ jobs:
350371
}
351372
]
352373
}
353-
- name: Upload test results
374+
- name: Upload test artifacts to GitHub
354375
uses: actions/upload-artifact@v4
355376
with:
356377
name: e2e_subs-results-${{ matrix.platform }}-${{ github.run_id }}

agreement/cryptoVerifier_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ func BenchmarkCryptoVerifierBundleVertification(b *testing.B) {
388388
}
389389
}
390390

391-
// TestCryptoVerifierVerificationFailures tests to see that the cryptoVerifier.VerifyVote returns an error in the vote response
391+
// TestCryptoVerifierVerificationErrs tests to see that the cryptoVerifier.VerifyVote returns an error in the vote response
392392
// when being unable to enqueue a vote.
393-
func TestCryptoVerifierVerificationFailures(t *testing.T) {
393+
func TestCryptoVerifierVerificationErrs(t *testing.T) {
394394
partitiontest.PartitionTest(t)
395395

396396
mainPool := execpool.MakePool(t)

agreement/persistence_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func TestEmptyMapDeserialization(t *testing.T) {
278278
require.NotNil(t, v1.Equivocators)
279279
}
280280

281-
func TestDecodeFailures(t *testing.T) {
281+
func TestDecodeErrs(t *testing.T) {
282282
partitiontest.PartitionTest(t)
283283
clock := timers.MakeMonotonicClock[TimeoutType](time.Date(2015, 1, 2, 5, 6, 7, 8, time.UTC))
284284
ce := clock.Encode()

0 commit comments

Comments
 (0)