Skip to content

Commit

Permalink
Merge branch 'main' into ui-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
bearni95 committed May 14, 2024
2 parents 02288e6 + 1a3cf6f commit 1d25e9a
Show file tree
Hide file tree
Showing 554 changed files with 59,617 additions and 5,433 deletions.
4 changes: 2 additions & 2 deletions .github/actions/install-pnpm-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ runs:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
version: 9
run_install: false

- name: Get pnpm store directory
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/blobstorage-preview.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/blobstorage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- "packages/blobstorage/**"

jobs:
test:
test-blobstorage:
runs-on: [taiko-runner]
steps:
- name: Cancel Previous Runs
Expand All @@ -33,7 +33,7 @@ jobs:
files: ./packages/blobstorage/coverage.txt
flags: blobstorage

push-docker-image:
push-blobstorage-docker-image:
# only push docker image on PR merge to main
if: ${{ github.event }} == 'push'
name: Build and push docker image
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/bridge-ui--ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Bridge UI Build and Checks

on: workflow_call

jobs:
build:
runs-on: [taiko-runner]
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout repository
uses: actions/checkout@v4

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

# This step is needed because the .env file is not committed to the repository
# and the Svelte check complains about not finding the exports from $env/static/public,
# which will be generated based on the .env file when running `svelte-kit sync`
- name: Copy .env.example to .env
working-directory: ./packages/bridge-ui
run: cp .env.example .env

- name: Export config to .env
working-directory: ./packages/bridge-ui
run: pnpm export:config

- name: Build Svelte app
env:
SKIP_ENV_VALIDATION: "true"
working-directory: ./packages/bridge-ui
run: pnpm build

- name: Svelte check
working-directory: ./packages/bridge-ui
run: pnpm svelte:check

- name: Linting
working-directory: ./packages/bridge-ui
run: pnpm lint

- name: Unit tests
env:
SKIP_ENV_VALIDATION: "true"
working-directory: ./packages/bridge-ui
run: pnpm test:unit
33 changes: 0 additions & 33 deletions .github/workflows/bridge-ui-preview-internal.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/bridge-ui-production.yml

This file was deleted.

93 changes: 45 additions & 48 deletions .github/workflows/bridge-ui.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,55 @@
name: Bridge UI
name: Bridge UI CI/CD

on:
push:
branches: [main]
branches-ignore:
- main
- release-please-*
paths:
- "packages/bridge-ui/**"
tags:
- "bridge-ui-v*"
pull_request:
paths:
- "packages/bridge-ui/**"

jobs:
build:
runs-on: [taiko-runner]
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout repository
uses: actions/checkout@v4

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

# This step is needed because the .env file is not committed to the repository
# and the Svelte check complains about not finding the exports from $env/static/public,
# which will be generated based on the .env file when running `svelte-kit sync`
- name: Copy .env.example to .env
working-directory: ./packages/bridge-ui
run: cp .env.example .env

- name: Export config to .env
working-directory: ./packages/bridge-ui
run: pnpm export:config

- name: Build Svelte app
env:
SKIP_ENV_VALIDATION: "true"
working-directory: ./packages/bridge-ui
run: pnpm build

- name: Svelte check
working-directory: ./packages/bridge-ui
run: pnpm svelte:check

- name: Linting
working-directory: ./packages/bridge-ui
run: pnpm lint

- name: Unit tests
env:
SKIP_ENV_VALIDATION: "true"
working-directory: ./packages/bridge-ui
run: pnpm test:unit

# TODO: Playwright tests?
build-and-test:
uses: ./.github/workflows/bridge-ui--ci.yml

# Deployment name follow the pattern: deploy_<appname(bridge-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>
deploy_bridge-ui_hekla_preview:
if: ${{ github.ref_type != 'tag' }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
environment: "preview"
flags: ""
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI_HEKLA }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_bridge-ui_devnet_preview:
if: ${{ github.ref_type != 'tag' }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
environment: "preview"
flags: ""
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI_INTERNAL }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_bridge-ui_hekla_production:
if: ${{ startsWith(github.ref, 'refs/tags/bridge-ui-v') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
environment: "production"
flags: "--prod"
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI_HEKLA }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Docs Site Preview

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DOCS_SITE }}

on:
push:
branches-ignore:
- main
- release-please-*
paths:
- "packages/bridge-ui/**"
- "packages/docs-site/**"

jobs:
Deploy-Preview:
deploy-docs-site-preview:
runs-on: [taiko-runner]
steps:
- name: Checkout repository
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: Docs Site Production

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_BLOBSTORAGE }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DOCS_SITE }}

on:
push:
tags:
- "blobstorage-*"
- "docs-site-*"

jobs:
Deploy-Production:
deploy-docs-site-production:
runs-on: [taiko-runner]
steps:
- name: Checkout repository
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ on:
pull_request:
paths:
- "packages/eventindexer/**"
- "go.mod"
- "go.sum"

jobs:
lint:
name: lint
lint-eventindexer:
name: lint-eventindexer
runs-on: [taiko-runner]
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.21.0
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
Expand All @@ -28,9 +30,9 @@ jobs:
working-directory: ./packages/eventindexer
args: --config=.golangci.yml --timeout=4m

test:
test-eventindexer:
runs-on: [taiko-runner]
needs: lint
needs: lint-eventindexer
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand All @@ -52,9 +54,9 @@ jobs:
files: ./packages/eventindexer/coverage.txt
flags: eventindexer

push-docker-image:
push-eventindexer-docker-image:
# only push docker image on PR merge to main
if: ${{ github.event }} == 'push'
if: ${{ github.event == 'push' && github.ref == 'refs/heads/main' }}
name: Build and push docker image
runs-on: [taiko-runner]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Fork Diff Preview

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_FORK_DIFF }}
Expand All @@ -12,7 +14,7 @@ on:
- "packages/fork-diff/**"

jobs:
Deploy-Preview:
deploy-fork-diff-preview:
runs-on: [taiko-runner]
steps:
- name: Checkout repository
Expand Down
Loading

0 comments on commit 1d25e9a

Please sign in to comment.