Skip to content

Commit

Permalink
Merge pull request #163 from Layr-Labs/jb/withdrawals
Browse files Browse the repository at this point in the history
[slashing] Withdrawal support in CLI
  • Loading branch information
jbrower95 authored Dec 18, 2024
2 parents 6697b27 + 7fe165d commit e7cc883
Show file tree
Hide file tree
Showing 15 changed files with 579 additions and 134 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/cli_release.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/go_test.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .github/workflows/lint.yml

This file was deleted.

97 changes: 97 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# .github/workflows/release.yml
name: Build, test, release

on:
pull_request:
push:
# run only against tags
tags:
- "*"

permissions:
contents: write

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go 1.22
uses: actions/setup-go@v1
env:
GOPATH: /home/runner/.go
with:
go-version: 1.22.4

- name: Install dependencies
env:
GOPATH: /home/runner/.go
run: |
mkdir /home/runner/.go
make setup
go env
ls -lar $GOPATH
- name: Run Lint
env:
GOPATH: /home/runner/.go
run: /home/runner/.go/bin/golangci-lint run ./cli
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Install dependencies
run: |
go mod download
sudo apt-get install -y unzip
- name: Download blockchain data
run: |
curl -o data/deneb_holesky_beacon_state_2227472.ssz.zip https://dviu8zszosyat.cloudfront.net/deneb_holesky_beacon_state_2227472.ssz.zip
(cd data && unzip deneb_holesky_beacon_state_2227472.ssz.zip)
- name: Run tests
run: |
go test -v ./...
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run GoReleaser (tagged release)
uses: goreleaser/goreleaser-action@v6
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
workdir: cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser (branch)
uses: goreleaser/goreleaser-action@v6
if: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') }}
with:
distribution: goreleaser
version: "~> v2"
args: release --snapshot
workdir: cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ linters-settings:
- performance
- style
govet:
check-shadowing: true
shadow: true
enable:
- fieldalignment
nolintlint:
Expand All @@ -26,12 +26,11 @@ linters:
- dogsled
- dupl
- errcheck
- exportloopref
- copyloopvar
- exhaustive
- goconst
- gocritic
- gofmt
- gomnd
- gocyclo
- gosec
- gosimple
Expand Down
Loading

0 comments on commit e7cc883

Please sign in to comment.