Browser #4223
Workflow file for this run
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
name: Browser | |
on: | |
workflow_call: | |
inputs: | |
dep-cache-key: | |
required: true | |
type: string | |
submodule-cache-key: | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
dep-cache-key: | |
required: false | |
default: 'none' | |
submodule-cache-key: | |
required: false | |
default: 'none' | |
env: | |
cwd: ${{github.workspace}} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-browser | |
cancel-in-progress: true | |
jobs: | |
test-all-browser: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
# We clone the repo and submodules if triggered from work-flow dispatch | |
- if: inputs.submodule-cache-key == 'none' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key) | |
- if: inputs.dep-cache-key != 'none' | |
uses: actions/cache/restore@v4 | |
id: dep-cache | |
with: | |
path: ${{github.workspace}} | |
key: ${{ inputs.dep-cache-key }} | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Install Dependencies (if called from workflow_dispatch) | |
if: steps.dep-cache.outputs.cache-hit != 'true' | |
run: npm ci | |
working-directory: ${{ github.workspace }} | |
- if: inputs.submodule-cache-key != 'none' | |
uses: actions/cache/restore@v4 | |
name: Restore ethereum-tests from cache if available | |
id: submodules-cache | |
with: | |
path: ${{github.workspace}}/packages/ethereum-tests | |
key: ${{ inputs.submodule-cache-key }} | |
- run: npm run install-browser-deps | |
- run: npm run test:browser --workspaces --if-present | |