Skip to content

Commit

Permalink
add pipelines (#10)
Browse files Browse the repository at this point in the history
* add pipelines
  • Loading branch information
shrimalmadhur authored Dec 3, 2023
1 parent 2697097 commit f1c9694
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: build

on:
push:
branches:
- master
pull_request:

jobs:
Test:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
run: make build
22 changes: 22 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: lint

on:
push:
branches:
- master
pull_request:

jobs:
Lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 3m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: unit-tests
name: tests

on:
push:
Expand All @@ -8,12 +8,12 @@ on:

jobs:
Test:
name: Test
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Test
- name: Unit Test
run: make tests
20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help build tests mocks
.PHONY: help build tests mocks fmt format-lines lint install build-linux-amd64 build-linux-arm64 build-linux

include .env

Expand Down Expand Up @@ -26,4 +26,20 @@ fmt: ## formats all go files

format-lines: ## formats all go files with golines
go install github.com/segmentio/golines@latest
golines -w -m 120 --ignore-generated --shorten-comments --ignored-dirs=${GO_LINES_IGNORED_DIRS} ${GO_FOLDERS}
golines -w -m 120 --ignore-generated --shorten-comments --ignored-dirs=${GO_LINES_IGNORED_DIRS} ${GO_FOLDERS}

lint: ## runs all linters
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run ./...

install: build ## compile the binary and copy it to PATH
@sudo cp bin/$(APP_NAME) /usr/local/bin

build-linux-amd64: ## Compile the binary for amd64
@env GOOS=linux GOARCH=amd64 go build -o bin/$(APP_NAME)-linux-amd64 cmd/$(APP_NAME)/main.go

build-linux-arm64: ## Compile the binary for arm64
@env GOOS=linux GOARCH=arm64 go build -o bin/$(APP_NAME)-linux-arm64 cmd/$(APP_NAME)/main.go

build-linux: ## Compile the binary for linux
@env GOOS=linux go build -o bin/$(APP_NAME) cmd/$(APP_NAME)/main.go
2 changes: 1 addition & 1 deletion pkg/operator/keys/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ This command will import keys in $HOME/.eigenlayer/operator_keys/ location
case KeyTypeBLS:
privateKeyBigInt := new(big.Int)
_, ok := privateKeyBigInt.SetString(privateKey, 10)
blsKeyPair := new(bls.KeyPair)
var blsKeyPair *bls.KeyPair
var err error
if ok {
fmt.Println("Importing from large integer")
Expand Down

0 comments on commit f1c9694

Please sign in to comment.