-
Notifications
You must be signed in to change notification settings - Fork 208
172 lines (145 loc) · 4.95 KB
/
go.yml
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
169
170
171
172
name: Go
on:
push:
branches: [main]
paths:
- '**' # include all files
- '!.github/**' # exclude .github directory
- '!**.md' # exclude all markdown files
- 'doc-site/docs/reference/**.md' # include markdown files that are auto generated and need to be tested
pull_request:
paths:
- '**' # include all files
- '!.github/**' # exclude .github directory
- '!**.md' # exclude all markdown files
- 'doc-site/docs/reference/**.md' # include markdown files that are auto generated and need to be tested
workflow_dispatch:
jobs:
build:
env:
TEST_ARGS: -v
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22
- name: Build and Test
run: make
- uses: codecov/codecov-action@v4
with:
codecov_yml_path: ./codecov.yml
token: ${{ secrets.CODECOV_TOKEN }}
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22
- name: Build Docker image
run: make docker
- name: Save Docker image
run: docker save --output firefly.tar.gz hyperledger/firefly
- name: Upload Docker image
uses: actions/upload-artifact@v3
with:
name: firefly-docker
path: firefly.tar.gz
e2e-test:
runs-on: ubuntu-latest
needs: docker
strategy:
fail-fast: false
matrix:
stack-type: [ethereum, fabric]
exclude: [stack-type: ethereum, stack-type: fabric]
include:
- stack-type: ethereum
blockchain-connector: evmconnect
test-suite: TestEthereumMultipartyE2ESuite
database-type: sqlite3
token-provider: erc20_erc721
multiparty-enabled: true
- stack-type: ethereum
blockchain-connector: evmconnect
test-suite: TestEthereumMultipartyE2ESuite
database-type: postgres
token-provider: erc20_erc721
multiparty-enabled: true
- stack-type: ethereum
blockchain-connector: evmconnect
test-suite: TestEthereumMultipartyE2ESuite
database-type: sqlite3
token-provider: erc1155
multiparty-enabled: true
- stack-type: ethereum
blockchain-connector: evmconnect
test-suite: TestEthereumMultipartyTokensRemoteNameE2ESuite
database-type: postgres
token-provider: erc20_erc721
multiparty-enabled: true
- stack-type: fabric
test-suite: TestFabricE2ESuite
database-type: sqlite3
token-provider: none
multiparty-enabled: true
- stack-type: ethereum
blockchain-connector: evmconnect
test-suite: TestEthereumGatewayE2ESuite
database-type: sqlite3
token-provider: erc20_erc721
multiparty-enabled: false
- stack-type: fabric
test-suite: TestFabricGatewayE2ESuite
database-type: sqlite3
token-provider: none
multiparty-enabled: false
- stack-type: ethereum
blockchain-connector: ethconnect
test-suite: TestEthereumMultipartyE2ESuite
database-type: sqlite3
token-provider: erc20_erc721
multiparty-enabled: true
- stack-type: ethereum
blockchain-connector: ethconnect
test-suite: TestEthereumGatewayLegacyEthE2ESuite
database-type: sqlite3
token-provider: erc1155
multiparty-enabled: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22
- name: Download Docker image
uses: actions/download-artifact@v3
with:
name: firefly-docker
- name: Load Docker image
run: docker load --input firefly.tar.gz
- name: Run E2E tests
env:
BUILD_FIREFLY: false
TEST_SUITE: ${{ matrix.test-suite }}
STACK_TYPE: ${{ matrix.stack-type }}
BLOCKCHAIN_CONNECTOR: ${{ matrix.blockchain-connector }}
TOKENS_PROVIDER: ${{ matrix.token-provider }}
DATABASE_TYPE: ${{ matrix.database-type }}
MULTIPARTY_ENABLED: ${{ matrix.multiparty-enabled }}
run: ./test/e2e/run.sh
- name: Archive container logs
uses: actions/upload-artifact@v3
if: always()
with:
name: container-logs-${{ matrix.test-suite }}-${{ matrix.blockchain-provider }}-${{ matrix.blockchain-connector }}-${{ matrix.database-type }}-${{ matrix.token-provider }}
path: containerlogs/logs.txt