Skip to content

fix(unique-id): use unique ids for cross-registrar entities (#108) #97

fix(unique-id): use unique ids for cross-registrar entities (#108)

fix(unique-id): use unique ids for cross-registrar entities (#108) #97

Workflow file for this run

name: CI pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
static-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Audit dependencies
run: pnpm audit --audit-level=low
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Biome CI
run: pnpm -r lint:ci
- name: Run TypeScript type checks
run: pnpm -r typecheck
# This will run the dev command in background, wait for
# RUNTIME_CHECK_TIMEOUT_SECONDS seconds, and then kill the process if it
# is still running. If the command does not throw an error within that
# time, the step will exit successfully. If it does throw an error,
# the step will exit and fail the CI pipeline. This runtime check uses
# a pglite database that only lives in the CI environment.
# It will be discarded after the CI run.
- name: Run Ponder runtime integrity checks
working-directory: apps/ensnode
env:
ACTIVE_PLUGINS: eth,base.eth,linea.eth
RPC_URL_1: https://eth.drpc.org
RPC_URL_8453: https://base.drpc.org
RPC_URL_59144: https://linea.drpc.org
RUNTIME_CHECK_TIMEOUT_SECONDS: 10
run: |
pnpm dev -vv &
PID=$!
sleep $RUNTIME_CHECK_TIMEOUT_SECONDS
if ps -p $PID > /dev/null; then
kill $PID
wait $PID || true
exit 0
else
wait $PID
exit $?
fi
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unit tests
run: pnpm -r test
ensrainbow-docker-build:
runs-on: ubuntu-latest
needs: [static-analysis, unit-tests]
# we only build the docker image after a push to the branch
if: github.event_name == 'push'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image for ENSRainbow app
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}/ensrainbow
TAG: ${{ github.ref == 'refs/heads/main' && 'latest' || github.ref == 'refs/heads/alpha' && 'alpha' || github.ref == 'refs/heads/subgraph' && 'subgraph' }}
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker build -f apps/ensrainbow/Dockerfile -t $IMAGE_NAME:$TAG -t $IMAGE_NAME:${{ github.sha }} .
docker save $IMAGE_NAME:$TAG $IMAGE_NAME:${{ github.sha }} > image.tar
- name: Upload Docker image artifact
uses: actions/upload-artifact@v4
with:
name: ensrainbow-docker-image
path: ensrainbow-docker-image.tar
ensrainbow-docker-push:
runs-on: ubuntu-latest
needs: [ensrainbow-docker-build]
steps:
- name: Download Docker image artifact
uses: actions/download-artifact@v4
with:
name: ensrainbow-docker-image
- name: Push Docker image for ENSRainbow app to GitHub Container Registry
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}/ensrainbow
TAG: latest
run: |
docker load < ensrainbow-docker-image.tar
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker push $IMAGE_NAME:$TAG
docker push $IMAGE_NAME:${{ github.sha }}