Skip to content

feat: gloas lc support #33834

feat: gloas lc support

feat: gloas lc support #33834

Workflow file for this run

name: Tests
# only one can run at a time
concurrency:
# If PR, cancel prev commits. head_ref = source branch name on pull_request, null if push
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
# We intentionally don't run push on feature branches. See PR for rational.
branches: [unstable, stable]
pull_request:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: warp-ubuntu-2204-x64-4x
strategy:
fail-fast: false
matrix:
node: [24]
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: "./.github/actions/setup-and-build"
with:
node: ${{ matrix.node }}
- name: Test root binary exists
run: ./lodestar --version
- name: Reject pnpm-lock.yaml changes
run: .github/workflows/scripts/reject_pnpm_lock_changes.sh
# Run only on forks
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
lint:
name: Lint
needs: build
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
node: [24]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: "./.github/actions/setup-and-build"
with:
node: ${{ matrix.node }}
- name: Assert pnpm prints no warnings
run: scripts/assert_no_pnpm_warnings.sh
- name: Assert @chainsafe/persistent-merkle-tree is not duplicated
run: scripts/assert_persistent_merkle_tree_dedup.sh
- name: Lint Code
run: pnpm lint
- name: Lint Grafana dashboards
run: scripts/validate-grafana-dashboards.sh
- name: Assert ESM module exports
run: node scripts/assert_exports.mjs
type-checks:
name: Type Checks
needs: build
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
node: [24]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: "./.github/actions/setup-and-build"
with:
node: ${{ matrix.node }}
- name: Check Types
run: pnpm check-types
- name: README check
run: pnpm check-readme
unit-tests:
name: Unit Tests
needs: type-checks
runs-on: warp-ubuntu-2204-x64-4x
strategy:
fail-fast: false
matrix:
node: [24]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: "./.github/actions/setup-and-build"
with:
node: ${{ matrix.node }}
# Cache validator slashing protection data tests
- name: Restore spec tests cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: packages/validator/spec-tests
key: spec-test-data-${{ hashFiles('packages/validator/test/spec/params.ts') }}
- name: Unit tests
# id: unit_tests
# Rever to "pnpm test:unit" when finished debugging core dumps
# run: sudo sh -c "ulimit -c unlimited && /usr/bin/node-with-debug $(which pnpm) test:unit"
run: pnpm vitest run --project unit --project unit-minimal --coverage
# # Remove when finished debugging core dumps
# - uses: './.github/actions/core-dump'
# if: ${{ failure() && steps.unit_tests.conclusion == 'failure' }}
- name: Upload coverage data
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true # optional (default = false)
flags: "unit"
e2e-tests:
name: E2E Tests
runs-on: warp-ubuntu-2204-x64-4x
needs: build
strategy:
fail-fast: false
matrix:
node: [24]
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: "./.github/actions/setup-and-build"
with:
node: ${{ matrix.node }}
- name: Load env variables
uses: ./.github/actions/dotenv
- name: Run the e2e test environment
run: scripts/run_e2e_env.sh start
- name: E2E tests
run: pnpm test:e2e
env:
GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL!=0 && secrets.GOERLI_RPC_URL || env.GOERLI_RPC_DEFAULT_URL }}
- name: Stop the e2e test environment
run: scripts/run_e2e_env.sh stop
- name: Upload debug log test for test env
if: ${{ always() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: debug-e2e-test-logs-node-${{matrix.node}}
path: test-logs/e2e-test-env
browser-tests:
name: Browser Tests
runs-on: warp-ubuntu-2204-x64-4x
needs: build
strategy:
fail-fast: false
matrix:
node: [24]
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: "./.github/actions/setup-and-build"
with:
node: ${{ matrix.node }}
- name: Cache Playwright browsers
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install
run: pnpm playwright install chromium chromium-headless-shell firefox
timeout-minutes: 15
- name: Browser tests
run: |
export DISPLAY=':99.0'
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
pnpm test:browsers
spec-tests:
name: Spec tests
needs: build
runs-on: warp-ubuntu-2204-x64-4x
strategy:
fail-fast: false
matrix:
node: [24]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: "./.github/actions/setup-and-build"
with:
node: ${{ matrix.node }}
# Download spec tests with cache
- name: Restore spec tests cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: packages/beacon-node/spec-tests
key: spec-test-data-${{ hashFiles('spec-tests-version.json') }}
- name: Download spec tests
run: pnpm download-spec-tests
# Run them in different steps to quickly identifying which command failed
# Otherwise just doing `pnpm test:spec` you can't tell which specific suite failed
# many of the suites have identical names for minimal and mainnet
- name: Spec tests general
run: pnpm test:spec:general
working-directory: packages/beacon-node
- name: Spec tests bls
run: pnpm test:spec:bls
working-directory: packages/beacon-node
- name: Spec tests minimal
run: pnpm test:spec:minimal
working-directory: packages/beacon-node
- name: Spec tests mainnet
run: NODE_OPTIONS='--max-old-space-size=4096' pnpm test:spec:mainnet
working-directory: packages/beacon-node
- name: Spec tests validator
run: pnpm test:spec
working-directory: packages/validator