-
Notifications
You must be signed in to change notification settings - Fork 667
126 lines (114 loc) · 3.88 KB
/
nethermind-tests-flat.yml
File metadata and controls
126 lines (114 loc) · 3.88 KB
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
name: Nethermind tests (Flat DB)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
env:
TEST_USE_FLAT: "1"
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
TERM: xterm
jobs:
tests:
name: Run ${{ matrix.project }}${{ matrix.chunk && format(' ({0})', matrix.chunk) || '' }}
runs-on: ubuntu-latest
timeout-minutes: 15
continue-on-error: true
strategy:
matrix:
project:
- Ethereum.Abi.Test
- Ethereum.Basic.Test
- Ethereum.Blockchain.Block.Test
- Ethereum.Difficulty.Test
- Ethereum.HexPrefix.Test
- Ethereum.KeyAddress.Test
- Ethereum.KeyStore.Test
- Ethereum.Legacy.Blockchain.Block.Test
- Ethereum.Legacy.Transition.Test
- Ethereum.Legacy.VM.Test
- Ethereum.PoW.Test
- Ethereum.Rlp.Test
- Ethereum.Transaction.Test
- Ethereum.Trie.Test
- Nethermind.Consensus.Test
- Nethermind.Core.Test
- Nethermind.Db.Test
- Nethermind.Runner.Test
chunk: ['']
include:
- project: Ethereum.Legacy.Blockchain.Test
chunk: 1of8
- project: Ethereum.Legacy.Blockchain.Test
chunk: 2of8
- project: Ethereum.Legacy.Blockchain.Test
chunk: 3of8
- project: Ethereum.Legacy.Blockchain.Test
chunk: 4of8
- project: Ethereum.Legacy.Blockchain.Test
chunk: 5of8
- project: Ethereum.Legacy.Blockchain.Test
chunk: 6of8
- project: Ethereum.Legacy.Blockchain.Test
chunk: 7of8
- project: Ethereum.Legacy.Blockchain.Test
chunk: 8of8
- project: Ethereum.Blockchain.Pyspec.Test
chunk: 1of4
- project: Ethereum.Blockchain.Pyspec.Test
chunk: 2of4
- project: Ethereum.Blockchain.Pyspec.Test
chunk: 3of4
- project: Ethereum.Blockchain.Pyspec.Test
chunk: 4of4
steps:
- name: Free up disk space
if: startsWith(matrix.project, 'Ethereum.Blockchain.Pyspec')
uses: jlumbroso/free-disk-space@v1.3.1
with:
large-packages: false
tool-cache: false
- name: Check out repository
uses: actions/checkout@v6
with:
submodules: ${{ startsWith(matrix.project, 'Ethereum.Blockchain.Pyspec') && 'false' || 'recursive' }}
- name: Set up .NET
uses: actions/setup-dotnet@v5
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ runner.os }}-${{ hashFiles('Directory.Packages.props', 'global.json') }}
restore-keys: nuget-${{ runner.os }}-
- name: ${{ matrix.project }}
id: test
working-directory: src/Nethermind/${{ matrix.project }}
env:
TEST_CHUNK: ${{ matrix.chunk }}
run: |
dotnet test --project ${{ matrix.project }}.csproj -c release
- name: Save test outcome
if: success() || failure()
run: echo "${{ steps.test.outcome == 'success' }}," >> test.outcome
- name: Upload test outcome
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.project }}${{ matrix.chunk && format('-{0}', matrix.chunk) || '' }}-flat-outcome
path: test.outcome
retention-days: 1
tests-summary:
name: Tests summary
needs: tests
runs-on: ubuntu-latest
steps:
- name: Download test outcomes
uses: actions/download-artifact@v4
- name: Ensure all tests passed
run: |
data=$(cat **/test.outcome) && data=${data%?}
passed=$(echo "[$data]" | jq -r 'all')
[[ "$passed" == "true" ]] && exit 0 || exit 1