Skip to content

[docs] validator-committer service #22

[docs] validator-committer service

[docs] validator-committer service #22

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: [ "**" ]
env:
DB_DEPLOYMENT: local
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-committer" -w .
# Re make protobufs, overwriting any formatting
PATH="$HOME/bin:$PATH" make proto
# 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
run: make build
unit-test:
name: Unit Test (non DB)
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-no-db
fuzz-test:
name: Fuzz Test (non DB)
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-fuzz
db-test:
name: Requires and Core DB Tests (postgres)
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: scripts/get-and-start-postgres.sh
- run: make test-requires-db test-core-db
core-db-test:
name: Core DB Tests (yugabyte)
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: scripts/get-and-start-yuga.sh
- run: make test-core-db
integration-test:
name: Integration Tests (yugabyte)
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: scripts/get-and-start-yuga.sh
- run: make test-integration
db-resiliency-test:
name: Integration DB Resiliency (container)
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-integration-db-resiliency
container-test:
name: Build and test all-in-one test image (container)
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-container