Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Update Github action #46

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 5 additions & 93 deletions .github/workflows/check-source-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main, develop]

jobs:
code-format:
check-code:
name: Code format
strategy:
matrix:
Expand All @@ -16,28 +16,14 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: Checkout
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Install mockgen
run: make install-mockgen

- name: Generate mocks
run: make generate

- name: Instal gofumpt
run: make install-gofumpt

- name: Install dependencies
run: make install-deps
- name: Check code format
run: |
if [[ ! -z $(make format) ]];
Expand All @@ -46,41 +32,10 @@ jobs:
exit 1
fi
shell: bash

- name: Install staticcheck
run: make install-staticcheck

- name: Run staticcheck
run: make staticcheck
build:
name: Build
needs: code-format
strategy:
matrix:
go: ["1.20"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf

- name: Checkout
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Install mockgen
run: make install-mockgen

- name: Generate mocks
run: make generate

- name: Run staticcheck
run: make staticcheck
- name: Check go mod status
run: |
make gomod_tidy
Expand All @@ -92,52 +47,9 @@ jobs:
exit 1
fi
shell: bash

- name: Check build
run: make build
test:
name: Run tests
needs: build
strategy:
matrix:
go: ["1.20"]
os: [ubuntu-latest]
codecov: [false]
runs-on: ${{ matrix.os }}

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

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

- name: Install deps
run: make install-deps

- name: Generate mocks
run: make generate

- name: Unit tests
if: matrix.codecov == false
run: make unit-test

- name: Codecov tests
if: matrix.codecov == true
run: make codecov-test

- name: Upload coverage to Codecov
if: matrix.codecov == true
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
files: ./coverage.out
flags: unittests
name: codecov-umbrella
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: E2E tests
run: make e2e-test
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
go: [1.20]
go: ["1.20"]
runs-on: ${{ matrix.os }}
env:
VERSION: ${{ github.event.inputs.tag }}
steps:
- name: Set git to use LF
run: \
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
Expand Down Expand Up @@ -68,6 +64,7 @@ jobs:
path: build/eigenlayer-linux-arm64
publish-github:
name: Pre-release eigenlayer and upload binaries to GitHub
needs: eigenlayer-linux
runs-on: ubuntu-latest
env:
VERSION: ${{ github.event.inputs.tag }}
Expand Down