-
Notifications
You must be signed in to change notification settings - Fork 13
104 lines (104 loc) · 3.1 KB
/
ci.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
name: CI
on:
pull_request:
branches:
- master
jobs:
build:
name: Build on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Go 1.18
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Check out project files
uses: actions/checkout@v2
- name: Build
run: make
itest:
name: Run itests on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Go 1.18
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Checkout project files
uses: actions/checkout@v2
with:
path: main
- name: Checkout quorum-signer Vault plugin
uses: actions/checkout@v2
with:
repository: ConsenSys/quorum-signer-plugin-for-hashicorp-vault
path: quorum-signer
ref: v0.2.0
- name: Checkout quorum
uses: actions/checkout@v2
with:
repository: ConsenSys/quorum
path: quorum
- name: Build quorum-signer Vault plugin
run: |
pushd quorum-signer
go mod tidy
make
ls build
go build -o bin/quorum-signer .
ls bin
popd
- name: Build quorum
run: |
mkdir -p $(go env GOPATH)/ethereum/go-ethereum
cp -a quorum/. $(go env GOPATH)/ethereum/go-ethereum/
pushd $(go env GOPATH)/ethereum/go-ethereum
make all
ls build/bin
echo "$(go env GOPATH)/ethereum/go-ethereum/build/bin" >> $GITHUB_PATH
popd
- if: matrix.os == 'ubuntu-latest'
name: Install vault CLI (ubuntu)
run: |
wget https://releases.hashicorp.com/vault/1.6.0/vault_1.6.0_linux_amd64.zip -O /tmp/vault_1.6.0_linux_amd64.zip
mkdir -p vault/bin
pushd vault/bin
unzip /tmp/vault_1.6.0_linux_amd64.zip
echo "${PWD}" >> $GITHUB_PATH
popd
- if: matrix.os == 'macos-latest'
name: Install vault CLI (macos)
run: |
wget https://releases.hashicorp.com/vault/1.6.0/vault_1.6.0_darwin_amd64.zip -O /tmp/vault_1.6.0_darwin_amd64.zip
mkdir -p vault/bin
pushd vault/bin
unzip /tmp/vault_1.6.0_darwin_amd64.zip
echo "${PWD}" >> $GITHUB_PATH
popd
- name: Run itests
env:
PLUGIN_DIST: ${{ github.workspace }}/main/build/dist
PLUGIN_VERSION: 0.2.2-SNAPSHOT
VAULT_SIGNER_DIR: ${{ github.workspace }}/quorum-signer/bin
VAULT_SIGNER_NAME: quorum-signer
run: |
set -x
geth version
vault -v
ls quorum-signer/build
set +x
make -C main itest
- if: ${{ failure() }}
name: Upload test output
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-testout
path: main/internal/test/integration/testout/