Skip to content

Op-Conductor Localnet #408

Op-Conductor Localnet

Op-Conductor Localnet #408

Workflow file for this run

# Copyright (c) 2024 Hemi Labs, Inc.
# Use of this source code is governed by the MIT License,
# which can be found in the LICENSE file.
# GitHub Actions workflow to lint, build and test NPM packages.
name: "Node"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
workflow_call:
concurrency:
group: "node-${{ github.workflow }}-${{ github.event.number || github.ref }}"
cancel-in-progress: "${{ github.event_name == 'pull_request' }}"
env:
GO_VERSION: "1.23.x"
PNPM_VERSION: "9.4.x"
jobs:
build:
name: "Build"
runs-on: "ubuntu-latest"
permissions:
contents: read
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Setup Go ${{ env.GO_VERSION }}"
uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
cache: true
check-latest: true
- name: "Setup pnpm ${{ env.PNPM_VERSION }}"
uses: pnpm/action-setup@v4
with:
version: "${{ env.PNPM_VERSION }}"
- name: "Setup Node"
uses: actions/setup-node@v4
with:
node-version-file: "web/.nvmrc"
check-latest: true
cache: "pnpm"
cache-dependency-path: "web/**/pnpm-lock.yaml"
- name: "Install dependencies"
working-directory: "web/"
run: pnpm install --frozen-lockfile
- name: "Install Go dependencies"
working-directory: "web/"
run: make deps
# TODO(joshuasing): Install and use binaryen
- name: "Build @hemilabs/pop-miner WebAssembly binary"
working-directory: "web/"
run: make wasm
- name: "Build @hemilabs/pop-miner package"
working-directory: "web/"
run: pnpm build:pop-miner
- name: "Lint"
working-directory: "web/"
run: pnpm lint