Skip to content

Commit 6a75b2a

Browse files
committed
update CI for stale run cancel, and remove duplicate runs on PR
1 parent 1ed6871 commit 6a75b2a

File tree

5 files changed

+30
-16
lines changed

5 files changed

+30
-16
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
name: Nimbus CI
1212
on:
1313
push:
14+
branches:
15+
- master
1416
paths-ignore:
1517
- 'doc/**'
1618
- 'portal/docs/**'
@@ -34,6 +36,10 @@ on:
3436

3537
workflow_dispatch:
3638

39+
concurrency: # Cancel stale PR builds (but not push builds)
40+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
41+
cancel-in-progress: true
42+
3743
jobs:
3844
matrix_config:
3945
uses: ./.github/workflows/matrix_config.yml

.github/workflows/kurtosis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ on:
2525
- 'docker/**'
2626

2727
pull_request:
28-
branches:
29-
- master
3028
paths-ignore:
3129
- 'doc/**'
3230
- 'portal/docs/**'
@@ -37,6 +35,10 @@ on:
3735
- '.github/workflows/build_base_image.yml'
3836
- 'docker/**'
3937

38+
concurrency: # Cancel stale PR builds (but not push builds)
39+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
40+
cancel-in-progress: true
41+
4042
jobs:
4143
build:
4244
name: Nimbus eth1 - eth2 interop check

.github/workflows/nimbus_verified_proxy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
name: Nimbus verified proxy CI
1212
on:
1313
push:
14+
branches:
15+
- master
1416
paths:
1517
- '.github/workflows/nimbus_verified_proxy.yml'
1618
- 'nimbus_verified_proxy/**'
@@ -32,6 +34,10 @@ on:
3234
- 'Makefile'
3335
- 'nimbus.nimble'
3436

37+
concurrency: # Cancel stale PR builds (but not push builds)
38+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
39+
cancel-in-progress: true
40+
3541
jobs:
3642
matrix_config:
3743
uses: ./.github/workflows/matrix_config.yml

.github/workflows/portal.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
name: Nimbus Portal CI
99
on:
1010
push:
11+
branches:
12+
- master
1113
paths-ignore:
1214
- 'doc/**'
1315
- 'portal/docs/**'
@@ -29,6 +31,10 @@ on:
2931

3032
workflow_dispatch:
3133

34+
concurrency: # Cancel stale PR builds (but not push builds)
35+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
36+
cancel-in-progress: true
37+
3238
jobs:
3339
# separate job so it can run concurrently with other tests
3440
testutp:

execution_chain/transaction.nim

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ import
1212

1313
export addresses, keys, transactions
1414

15-
proc signTransaction*(tx: Transaction, privateKey: PrivateKey, eip155 = true): Transaction =
15+
proc signTransaction*(
16+
tx: Transaction, privateKey: PrivateKey, eip155 = true
17+
): Transaction =
1618
result = tx
1719
result.signature = result.sign(privateKey, eip155)
1820

@@ -30,27 +32,19 @@ func validateChainId*(tx: Transaction, chainId: ChainId): bool =
3032
chainId == tx.chainId
3133

3234
func maxPriorityFeePerGasNorm*(tx: Transaction): GasInt =
33-
if tx.txType < TxEip1559:
34-
tx.gasPrice
35-
else:
36-
tx.maxPriorityFeePerGas
35+
if tx.txType < TxEip1559: tx.gasPrice else: tx.maxPriorityFeePerGas
3736

3837
func maxFeePerGasNorm*(tx: Transaction): GasInt =
39-
if tx.txType < TxEip1559:
40-
tx.gasPrice
41-
else:
42-
tx.maxFeePerGas
38+
if tx.txType < TxEip1559: tx.gasPrice else: tx.maxFeePerGas
4339

4440
func effectiveGasPrice*(tx: Transaction, baseFeePerGas: GasInt): GasInt =
4541
if tx.txType < TxEip1559:
4642
tx.gasPrice
4743
else:
48-
baseFeePerGas +
49-
min(tx.maxPriorityFeePerGas, tx.maxFeePerGas - baseFeePerGas)
44+
baseFeePerGas + min(tx.maxPriorityFeePerGas, tx.maxFeePerGas - baseFeePerGas)
5045

51-
func effectiveGasTip*(tx: Transaction; baseFeePerGas: Opt[UInt256]): GasInt =
52-
let
53-
baseFeePerGas = baseFeePerGas.get(0.u256).truncate(GasInt)
46+
func effectiveGasTip*(tx: Transaction, baseFeePerGas: Opt[UInt256]): GasInt =
47+
let baseFeePerGas = baseFeePerGas.get(0.u256).truncate(GasInt)
5448

5549
min(tx.maxPriorityFeePerGasNorm(), tx.maxFeePerGasNorm() - baseFeePerGas)
5650

0 commit comments

Comments
 (0)