Move to pnpm #76
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: Test | |
permissions: | |
contents: read | |
on: | |
pull_request: | |
branches: | |
- main | |
- staging | |
workflow_dispatch: # Adds "Run workflow" button in GitHub UI | |
env: | |
WHISK_API_URL: ${{ secrets.WHISK_API_URL }} | |
WHISK_API_KEY: ${{ secrets.WHISK_API_KEY }} | |
NEXT_PUBLIC_URL: ${{ secrets.NEXT_PUBLIC_URL }} | |
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID }} | |
NEXT_PUBLIC_RPC_URL_1: ${{ secrets.NEXT_PUBLIC_RPC_URL_1 }} | |
jobs: | |
vitest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Restore Foundry RPC cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: ~/.foundry/cache/rpc-vitest | |
key: foundry-rpc-vitest-${{ github.ref_name }}-v1-${{ github.run_id }} | |
restore-keys: | | |
foundry-rpc-vitest-${{ github.ref_name }}-v1- | |
foundry-rpc-vitest--v1- | |
- uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
cache: false | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm vitest run | |
- name: Save Foundry RPC cache | |
if: always() | |
uses: actions/cache/save@v3 | |
with: | |
path: ~/.foundry/cache/rpc-vitest | |
key: foundry-rpc-vitest-${{ github.ref_name }}-v1-${{ github.run_id }} | |
playwright: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: pnpm | |
- name: Restore Foundry RPC cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: ~/.foundry/cache/rpc-playwright | |
key: foundry-rpc-playwright-${{ github.ref_name }}-v1-${{ github.run_id }} | |
restore-keys: | | |
foundry-rpc-playwright-${{ github.ref_name }}-v1- | |
foundry-rpc-playwright--v1- | |
- uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
cache: false | |
- run: pnpm install --frozen-lockfile | |
- name: Install Playwright Browsers | |
run: pnpm playwright install --with-deps | |
- name: Run Codegen | |
run: pnpm codegen | |
- name: Run Playwright tests | |
run: pnpm test:playwright | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Save Foundry RPC cache | |
if: always() | |
uses: actions/cache/save@v3 | |
with: | |
path: ~/.foundry/cache/rpc-playwright | |
key: foundry-rpc-playwright-${{ github.ref_name }}-v1-${{ github.run_id }} |