Skip to content

GitHub workflows

GitHub workflows #13

Workflow file for this run

# 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 ./...