forked from hyperledger/fabric-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (103 loc) · 2.6 KB
/
test.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
name: Test
on:
workflow_call:
env:
DEFAULT_GO_VERSION: '1.20'
jobs:
verify-versions:
uses: ./.github/workflows/verify-versions.yml
shellcheck:
runs-on: ubuntu-latest
name: ShellCheck
steps:
- uses: actions/checkout@v3
- run: make shellcheck
docs:
needs: verify-versions
uses: ./.github/workflows/build-docs.yml
go:
needs: verify-versions
runs-on: ubuntu-22.04
name: Test Go
strategy:
fail-fast: false
matrix:
go-version:
- '1.18'
- '1.19'
- '1.20'
env:
SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install SoftHSM
run: sudo apt install -y softhsm
env:
TMPDIR: ${{ runner.temp }}
- name: Generate mocks
run: make generate
- name: Run unit tests
run: make unit-test-go-pkcs11
- name: Pull Fabric Docker images
run: make pull-latest-peer
- name: Run scenario tests
run: make scenario-test-go
node:
needs: verify-versions
runs-on: ubuntu-22.04
name: Test Node
strategy:
fail-fast: false
matrix:
node-version:
- 14
- 16
- 18
env:
SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-go@v3
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Run unit tests
run: make unit-test-node
- name: Install SoftHSM
run: sudo apt install -y softhsm
env:
TMPDIR: ${{ runner.temp }}
- name: Pull Fabric Docker images
run: make pull-latest-peer
- name: Run scenario tests
run: make scenario-test-node
java:
needs: verify-versions
runs-on: ubuntu-22.04
name: Test Java
strategy:
fail-fast: false
matrix:
java-version:
- 8
- 11
- 17
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: temurin
cache: maven
- uses: actions/setup-go@v3
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Pull Fabric Docker images
run: make pull-latest-peer
- name: Run unit and scenario tests
run: make scenario-test-java