GitHub workflows #13
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: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Dependencies | |
| run: scripts/install-dev-dependencies.sh | |
| - name: Check | |
| run: | | |
| git fetch origin main | |
| git diff origin/main | |
| - name: Lint | |
| run: | | |
| gofmt -w . | |
| goimports -local "github.com/hyperledger/fabric-x-common" -w . | |
| # Check if original code changed due to formatting | |
| git diff --exit-code | |
| make lint | |
| - name: Build tools | |
| run: make tools | |
| - name: Tests | |
| run: go test -v ./... |