mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-10 08:08:16 -05:00
* chore!: use node 20 throughout monorepo * Add yarn.lock * Revert @types/node change * Fix ts-node usage * Add missed files * Remove more ts-node-esm * Update cross-fetch dependency * Update @types/node to 20.4.2 * Use node version 20.4 in CI * Revert "Use node version 20.4 in CI" * skip tests that break in CI * Update Dockerfile Co-authored-by: Nico Flaig <nflaig@protonmail.com> * Check code ECONNRESET in Lighthouse health response * Revert "Check code ECONNRESET in Lighthouse health response" * Revert "Update Dockerfile" This reverts commite1f07be309. * Revert CI from using node 20 * Revert "skip tests that break in CI" This reverts commitd296b2f1a2. * Fix the loader for few sim tests * Update CI node version to 20 * Fix e2e test * Remove try/catch from e2e test * Consistently use node 20 in CI * Fix missed 18.x reference in types readme * Set node 20.x in readme * Use node 18 in sim tests --------- Co-authored-by: Nico Flaig <nflaig@protonmail.com> Co-authored-by: Nazar Hussain <nazarhussain@gmail.com>
79 lines
2.5 KiB
YAML
79 lines
2.5 KiB
YAML
name: E2E tests
|
|
|
|
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:
|
|
|
|
env:
|
|
GOERLI_RPC_DEFAULT_URL: https://goerli.infura.io/v3/84842078b09946638c03157f83405213
|
|
GETH_DOCKER_IMAGE: ethereum/client-go:v1.11.6
|
|
NETHERMIND_DOCKER_IMAGE: nethermind/nethermind:1.18.0
|
|
|
|
jobs:
|
|
tests-main:
|
|
name: Tests
|
|
runs-on: buildjet-4vcpu-ubuntu-2204
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: [20]
|
|
steps:
|
|
# <common-build> - Uses YAML anchors in the future
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{matrix.node}}
|
|
check-latest: true
|
|
- name: Node.js version
|
|
id: node
|
|
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT
|
|
- name: Restore dependencies
|
|
uses: actions/cache@master
|
|
id: cache-deps
|
|
with:
|
|
path: |
|
|
node_modules
|
|
packages/*/node_modules
|
|
key: ${{ runner.os }}-${{ steps.node.outputs.v8CppApiVersion }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
|
|
- name: Install & build
|
|
if: steps.cache-deps.outputs.cache-hit != 'true'
|
|
run: yarn install --frozen-lockfile && yarn build
|
|
- name: Build
|
|
run: yarn build
|
|
if: steps.cache-deps.outputs.cache-hit == 'true'
|
|
# </common-build>
|
|
|
|
# Misc sanity checks
|
|
- name: Test root binary exists
|
|
run: ./lodestar --version
|
|
- name: Reject yarn.lock changes
|
|
run: .github/workflows/scripts/reject_yarn_lock_changes.sh
|
|
# Run only on forks
|
|
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
|
|
|
|
- name: Run the e2e test environment
|
|
run: scripts/run_e2e_env.sh start
|
|
|
|
- name: E2E tests
|
|
run: yarn 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@v2
|
|
with:
|
|
name: debug-e2e-test-logs
|
|
path: test-logs/e2e-test-env
|