End to end tests #2
Workflow file for this run
This file contains hidden or 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: End to end tests | |
| on: | |
| workflow_call: | |
| inputs: | |
| NPM_REGISTRY_NAME: | |
| type: string | |
| default: '@metamask' | |
| NPM_REGISTRY_URL: | |
| type: string | |
| required: false | |
| default: 'https://registry.npmjs.org' | |
| NPM_CLIENT: | |
| type: string | |
| default: 'yarn' | |
| RUN_FULL_TESTS: | |
| type: boolean | |
| default: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') }} | |
| workflow_dispatch: | |
| inputs: | |
| RUN_FULL_TESTS: | |
| type: boolean | |
| default: true | |
| jobs: | |
| pipeline: | |
| name: Turbo Pipeline | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - name: Checkout and setup environment | |
| uses: MetaMask/action-checkout-and-setup@v1 | |
| with: | |
| is-high-risk-environment: false | |
| cache-node-modules: ${{ matrix.node-version == '22.x' }} | |
| submodules: 'recursive' | |
| - name: Install Foundry | |
| uses: MetaMask/foundry-toolchain@v1 | |
| with: | |
| version: nightly | |
| - name: Run Forge Install | |
| run: forge install | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'yarn' | |
| - name: Install Yarn dependencies | |
| run: yarn install | |
| - name: Run build | |
| run: yarn build | |
| env: | |
| NODE_ENV: production | |
| - name: Run end-to-end tests | |
| run: | | |
| if [[ "${{ inputs.RUN_FULL_TESTS }}" == "true" ]]; then | |
| yarn e2etest:full | |
| else | |
| yarn e2etest:smoketest | |
| fi |