Skip to content

Commit

Permalink
Merge branch 'l2beat-main'
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhburade committed Nov 8, 2024
2 parents 8b92a1e + 1f6b94f commit a0f9bce
Show file tree
Hide file tree
Showing 1,317 changed files with 130,086 additions and 34,932 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=18-bullseye
ARG VARIANT=22-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:dev-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
Expand Down
40 changes: 19 additions & 21 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/javascript-node-postgres
// Update the VARIANT arg in docker-compose.yml to pick a Node.js version
{
"name": "Node.js & PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"name": "Node.js & PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
]
}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["dbaeumer.vscode-eslint"]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or with the host.
// "forwardPorts": [3000, 5432],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// This can be used to network with other containers or with the host.
// "forwardPorts": [3000, 5432],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pnpm install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
# Update 'VARIANT' to pick an LTS version of Node.js: 18, 16, 14.
# Append -bullseye or -buster to pin to an OS version.
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: 18-bullseye
VARIANT: 22-bullseye

volumes:
- ../..:/workspaces:cached
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,34 @@ jobs:
run:
working-directory: ./packages/frontend
steps:
- name: Checkout code
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: yarn
run: pnpm install
- name: Build dependencies
run: yarn build:dependencies
run: pnpm build:dependencies
- name: Publish to Chromatic
run: >
npx chromatic
pnpx chromatic
--project-token ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
--only-changed
--exit-once-uploaded
--exit-zero-on-changes
--externals packages/frontend/tailwind.config.ts
--externals *.css
--externals packages/frontend/src/fonts/**/*
--build-script-name storybook:build
--build-script-name storybook:build
118 changes: 74 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build container
uses: docker/build-push-action@v5
with:
Expand All @@ -32,19 +32,24 @@ jobs:
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 18.x
cache: "yarn"
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install

- name: Build frontend
run: yarn build:frontend
run: pnpm build:frontend

build-protocolbeat:
name: Build protocolbeat
Expand All @@ -54,19 +59,24 @@ jobs:
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 18.x
cache: "yarn"
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install

- name: Build protocolbeat
run: yarn build:protocolbeat
run: pnpm build:protocolbeat

build-tx-decoder:
name: Build tx-decoder
Expand All @@ -76,19 +86,24 @@ jobs:
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install

- name: Build tx-decoder
run: yarn build:tx-decoder
run: pnpm build:tx-decoder

build-uops-dashboard:
name: Build uops-dashboard
Expand All @@ -98,19 +113,24 @@ jobs:
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install

- name: Build tx-decoder
run: yarn build:uops-dashboard
run: pnpm build:uops-dashboard

typecheck:
name: Typecheck
Expand All @@ -120,19 +140,24 @@ jobs:
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install

- name: Typecheck
run: yarn typecheck
run: pnpm typecheck

test:
name: Test
Expand All @@ -157,26 +182,31 @@ jobs:
- 5432:5432
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install

- name: Test
run: yarn test --reporter min
run: pnpm test --reporter min

biome:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Biome CLI
uses: biomejs/setup-biome@v2
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install dependencies
run: yarn install --frozen-lockfile
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- run: pnpm install
- name: Apply migrations to STAGING
run: yarn prisma migrate deploy --schema=packages/database/prisma/schema.prisma
run: |
cd packages/database
pnpm prisma migrate deploy
env:
PRISMA_DB_URL: ${{ secrets.STAGING_DATABASE_URL }}
- name: Apply migrations to PRODUCTION
run: yarn prisma migrate deploy --schema=packages/database/prisma/schema.prisma
run: |
cd packages/database
pnpm prisma migrate deploy
env:
PRISMA_DB_URL: ${{ secrets.PRODUCTION_DATABASE_URL }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy-backend-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install heroku CLI
run: curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
- name: Login to heroku container registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-backend-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install heroku CLI
run: curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
- name: Login to heroku container registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-update-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install heroku CLI
run: curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
- name: Login to heroku container registry
Expand Down
Loading

0 comments on commit a0f9bce

Please sign in to comment.