Skip to content

Commit

Permalink
chore(repo): add taiko-client to taiko-mono (#16959)
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx authored May 8, 2024
1 parent 6ee06f1 commit d4b62d2
Show file tree
Hide file tree
Showing 182 changed files with 44,623 additions and 142 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/taiko-client-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: "Push docker image to GAR"

on:
push:
branches: [main]
tags:
- "taiko-client-v*"
paths:
- "packages/taiko-client/**"

jobs:
push-docker-image:
name: Build and push docker image
runs-on: ubuntu-latest

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

- name: Login to GAR
uses: docker/login-action@v2
with:
registry: us-docker.pkg.dev
username: _json_key
password: ${{ secrets.GAR_JSON_KEY }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
us-docker.pkg.dev/evmchain/images/taiko-client
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=sha
- name: Cache Go build
uses: actions/cache@v4
with:
enableCrossOsArchive: true
path: |
go-build-platforms
key: ${{ runner.os }}-go_build-platforms
restore-keys: |
${{ runner.os }}-go_build-platforms
- name: Inject cache into docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"go-build-platforms": "/root/.cache/go-build"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
64 changes: 64 additions & 0 deletions .github/workflows/taiko-client-swagger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Swagger

on:
push:
branches:
- main
paths:
- "packages/taiko-client/**"

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
name: Swagger autogen docs
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
cache: true

- name: install swag cli
run: go install github.com/swaggo/swag/cmd/swag@latest

- name: swag init
working-directory: packages/taiko-client
run: ./scripts/gen_swagger_json.sh

deploy:
if: ${{ always() }}
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: github pages deploy swagger docs
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "packages/taiko-client"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
60 changes: 60 additions & 0 deletions .github/workflows/taiko-client-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "CI"

on:
push:
branches: [main]
paths:
- "packages/taiko-client/**"
pull_request:
paths:
- "packages/taiko-client/**"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- name: Lint
working-directory: packages/taiko-client
run: make lint

integration_tests:
name: Integration tests
runs-on: ubuntu-latest

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v4

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
cache: true

- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Test
working-directory: packages/taiko-client
run: make test

- name: Codecov.io
uses: codecov/codecov-action@v3
with:
files: packages/taiko-client/coverage.out
1 change: 1 addition & 0 deletions .github/workflows/validate-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
protocol
relayer
taikoon
taiko-client
supplementary-contracts
requireScope: true
subjectPattern: ^(?![A-Z])(?!.*\btypo\b).+$ # Require lowercase PR title and prohibit word "typo"
Expand Down
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"packages/guardian-prover-health-check": "0.1.0",
"packages/guardian-prover-health-check-ui": "0.1.0",
"packages/protocol": "1.4.0",
"packages/relayer": "0.12.0"
"packages/relayer": "0.12.0",
"packages/taiko-client": "0.22.0"
}
6 changes: 6 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
# False positives
extend-ignore-identifiers-re = [
"QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
"TGE",
"tge",
]

[files]
extend-exclude = [
"*.png",
"*.svg",
"go.mod",
"CHANGELOG.md",
"packages/protocol/audit/code4rena-2024-03-taiko-final-report.md",
"packages/protocol/contracts/automata-attestation/**",
"packages/protocol/contracts/thirdparty/**",
"packages/protocol/contracts/compiled/**",
# TODO: fix typos and remove these
"packages/taiko-client/**",
]
Loading

0 comments on commit d4b62d2

Please sign in to comment.