-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(repo): add taiko-client to taiko-mono (#16959)
- Loading branch information
Showing
182 changed files
with
44,623 additions
and
142 deletions.
There are no files selected for viewing
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,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 }} |
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,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 |
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,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 |
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
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
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.