Skip to content

Use golangci-lint

Use golangci-lint #142

Workflow file for this run

# 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: |
npm install -g license-check-and-add@4.0.5
- name: Lint
run: make lint
- name: Check Licenses
run: license-check-and-add check -f ci/license-config.json
- name: Run tests (excluding fv)
run: make unit-test
- name: Run functional tests
run: make functional-test
- 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