-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: cleanup into a single per-pr.yml gha (#295)
* ci: cleanup into a single per-pr.yml gha * chore: fix golangci.yml issues * ci: rename gchr -> push-ghcr.yml * ci: rename per-pr workflow to CI (readme badge looks better) * docs: update README with new ci badges
- Loading branch information
Showing
10 changed files
with
134 additions
and
212 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: CI # this name appears in the badge on the README | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
env: | ||
GO_VERSION: '1.22' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION}} | ||
# TODO: fix the local/ci drift... locally we use `make lint`. | ||
# We should probably use mise to install golangci-lint and other dependencies, | ||
# and then we could run make commands in CI. | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.61 | ||
args: --timeout 3m | ||
|
||
# This checks that the flags in .env.holesky.example are valid and allow the proxy to start. | ||
flags: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION}} | ||
- name: Run flag test | ||
run: ${{ github.workspace }}/scripts/test-proxy-startup-with-env-vars.sh | ||
|
||
test: | ||
outputs: | ||
COVERAGE: ${{ steps.unit.outputs.coverage }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: go mod download | ||
|
||
# These tests are all pretty fast (<15s each), so we run them sequentially. | ||
# If ever they become slow we could parallelize them by using a matrix strategy. | ||
- run: make test-unit | ||
- run: make test-e2e-local | ||
- run: make test-e2e-holesky | ||
env: | ||
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }} | ||
ETHEREUM_RPC: ${{ secrets.ETHEREUM_RPC }} | ||
|
||
fuzz: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: go mod download | ||
- run: make test-e2e-fuzz | ||
|
||
build-binary: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: make eigenda-proxy | ||
|
||
build-docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: docker/build-push-action@v5 | ||
with: | ||
push: false | ||
context: . | ||
tags: eigenda-proxy | ||
# We also test that the docker container starts up correctly. | ||
- name: Run container as background process | ||
shell: bash | ||
run: | | ||
docker run -d \ | ||
-p 6666:6666 \ | ||
-e EIGENDA_PROXY_ADDR=0.0.0.0 \ | ||
-e EIGENDA_PROXY_PORT=6666 \ | ||
-e EIGENDA_PROXY_MEMSTORE_ENABLED=true \ | ||
eigenda-proxy | ||
- name: Wait for rpc to come up | ||
shell: bash | ||
run: | | ||
${{ github.workspace }}/scripts/wait-for.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and push container | ||
name: Push Release Image to ghcr # This name is displayed in the badge | ||
|
||
on: | ||
push: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# For github action yaml file formatting. | ||
# Useful when used with vscode yamlfmt extension. | ||
# TODO: Currently not enforced by CI. | ||
formatter: | ||
type: basic | ||
retain_line_breaks_single: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.