[proto] add block query APIs #239
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright IBM Corp. All Rights Reserved. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # | |
| name: CI | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| pull_request: | |
| branches: [ "**" ] | |
| jobs: | |
| lint: | |
| name: Lint and Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - run: scripts/install-dev-dependencies.sh | |
| - name: Lint | |
| run: | | |
| # Apply automatic formatting. | |
| gofmt -w . | |
| goimports -local "github.com/hyperledger/fabric-x-common" -w . | |
| # Re make protobufs and mocks, overwriting any formatting | |
| PATH="$HOME/bin:$PATH" make proto | |
| PATH="$HOME/bin:$PATH" make mocks | |
| # Check if original code changed due to formatting. | |
| git diff --exit-code | |
| # Fetch main to only show new lint issues. | |
| git fetch -u origin main:main | |
| make lint | |
| - name: Build tools | |
| run: make tools | |
| test: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - run: scripts/install-dev-dependencies.sh | |
| - run: make test-cover | |
| - name: Send coverage | |
| uses: shogo82148/actions-goveralls@v1 | |
| with: | |
| path-to-profile: coverage.profile |