fix: add repository.url for npm provenance publishing #350
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: E2E Tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| environment: CI | |
| steps: | |
| # Checkout repository | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout source | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| # Enable Corepack and pin Yarn version (matching repo) | |
| - name: Set up Corepack + yarn | |
| run: | | |
| npm install -g corepack | |
| yarn set version 4.9.2 | |
| # Install root dependencies (workspace install) | |
| - name: Install root dependencies | |
| run: yarn | |
| # Install Foundry (anvil/forge/cast) | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0 | |
| # Install Forge dependencies | |
| - name: Install Forge dependencies | |
| working-directory: example/smart-contracts | |
| run: | | |
| forge install foundry-rs/forge-std | |
| forge install OpenZeppelin/openzeppelin-contracts | |
| # Build smart contracts with Foundry | |
| - name: Build smart contracts | |
| working-directory: example/smart-contracts | |
| run: forge build | |
| # Create the .env file required by Playwright tests | |
| - name: Set E2E env variables | |
| working-directory: example/frontend | |
| run: | | |
| echo "E2E_TEST_SEED_PHRASE=${{ secrets.E2E_TEST_SEED_PHRASE }}" > .env | |
| echo "E2E_CONTRACT_PROJECT_ROOT=../smart-contracts" >> .env | |
| echo "E2E_TEST_FORK_URL=${{ secrets.E2E_TEST_FORK_URL }}" >> .env | |
| echo "E2E_TEST_FORK_BLOCK_NUMBER=23850654" >> .env | |
| echo "PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS=1" >> .env | |
| # Install frontend workspace dependencies (Ensures its own deps are available) | |
| - name: Install frontend dependencies | |
| working-directory: example/frontend | |
| run: yarn | |
| # Prepare the MetaMask extension for Playwright | |
| - name: Prepare MetaMask extension | |
| working-directory: example/frontend | |
| run: yarn prepare-metamask | |
| # Prepare the Coinbase extension for Playwright | |
| - name: Prepare Coinbase extension | |
| working-directory: example/frontend | |
| run: yarn prepare-coinbase | |
| # Prepare the Phantom extension for Playwright | |
| - name: Prepare Phantom extension | |
| working-directory: example/frontend | |
| run: yarn prepare-phantom | |
| # Install browsers & system deps for Playwright | |
| - name: Install Playwright browsers | |
| working-directory: example/frontend | |
| run: yarn playwright install --with-deps | |
| # Build the frontend | |
| - name: Yarn build | |
| working-directory: example/frontend | |
| run: yarn build | |
| # Install X virtual framebuffer for headful browser tests | |
| - name: Install xvfb | |
| run: sudo apt-get update && sudo apt-get install -y xvfb | |
| # Run the end-to-end test suite under virtual display | |
| - name: Run E2E tests | |
| working-directory: example/frontend | |
| run: xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" yarn test:e2e |