-
Notifications
You must be signed in to change notification settings - Fork 103
64 lines (51 loc) · 1.84 KB
/
build.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
# Copyright the Hyperledger Fabric contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: fabric-contract-api-go
on:
pull_request:
branches:
- main
- release-*
workflow_dispatch:
workflow_call:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: 'https://npm.pkg.github.com'
- uses: actions/checkout@v4
- name: install Tools
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install github.com/cucumber/godog/cmd/godog@latest
go install golang.org/x/tools/cmd/goimports@latest
npm install -g license-check-and-add@4.0.5
- name: Vet and lint
run: ci/scripts/lint.sh
- name: Check Licenses
run: license-check-and-add check -f ci/license-config.json
- name: Run tests (excluding fv)
run: go test -race $(go list ./... | grep -v functionaltests)
- name: Run functional tests
working-directory: internal/functionaltests
run: godog run features/*
- name: Check tutorial contents
run: ci/scripts/tutorial-checks.sh
- name: Run the integration tests
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker build . --file integrationtest/Dockerfile --tag hyperledger/fabric-contract-api-go-integrationtest
ci/scripts/setup-integration-chaincode.sh
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh | bash -s -- samples binary docker
export TEST_NETWORK_DIR=$(pwd)/fabric-samples/test-network
cd ./integrationtest
npm ci
npx fabric-chaincode-integration run