Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
154 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Browser tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- stable | ||
- unstable | ||
pull_request: | ||
branches: | ||
- stable | ||
- unstable | ||
|
||
jobs: | ||
tests-main: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [16] | ||
steps: | ||
# <common-build> - Uses YAML anchors in the future | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{matrix.node}} | ||
- name: Node.js version | ||
id: node | ||
run: echo "::set-output name=v8CppApiVersion::$(node --print "process.versions.modules")" | ||
- 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 --ignore-optional && 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: Browser tests | ||
run: | | ||
export DISPLAY=':99.0' | ||
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | ||
yarn test:browsers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: E2E tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- stable | ||
- unstable | ||
pull_request: | ||
branches: | ||
- stable | ||
- unstable | ||
|
||
env: | ||
GOERLI_RPC_DEFAULT_URL: https://goerli.infura.io/v3/84842078b09946638c03157f83405213 | ||
|
||
jobs: | ||
tests-main: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [16] | ||
steps: | ||
# <common-build> - Uses YAML anchors in the future | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{matrix.node}} | ||
- name: Node.js version | ||
id: node | ||
run: echo "::set-output name=v8CppApiVersion::$(node --print "process.versions.modules")" | ||
- 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 --ignore-optional && 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: E2E tests | ||
run: yarn test:e2e | ||
env: | ||
GOERLI_RPC_URL: ${{ secrets.GOERLI_RPC_URL!=0 && secrets.GOERLI_RPC_URL || env.GOERLI_RPC_DEFAULT_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters