Skip to content

Commit

Permalink
chore: cleanup ci workflows and use default env
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlc03 committed Sep 8, 2024
1 parent a5b3609 commit c5ba817
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 63 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ on:
branches: [main]
pull_request:

env:
NEXT_PUBLIC_CHAIN_NAME: ${{ vars.NEXT_PUBLIC_CHAIN_NAME }}
NEXT_PUBLIC_ADMIN_ADDRESS: ${{ vars.NEXT_PUBLIC_ADMIN_ADDRESS }}
NEXT_PUBLIC_APPROVAL_SCHEMA: ${{ vars.NEXT_PUBLIC_APPROVAL_SCHEMA }}
NEXT_PUBLIC_METADATA_SCHEMA: ${{ vars.NEXT_PUBLIC_METADATA_SCHEMA }}
NEXT_PUBLIC_ROUND_ID: ${{ vars.NEXT_PUBLIC_ROUND_ID }}
NEXT_PUBLIC_MACI_ADDRESS: ${{ vars.NEXT_PUBLIC_MACI_ADDRESS }}
NEXT_PUBLIC_TALLY_URL: ${{ vars.NEXT_PUBLIC_TALLY_URL }}
NEXT_PUBLIC_WALLETCONNECT_ID: ${{ secrets.NEXT_PUBLIC_WALLETCONNECT_ID }}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down Expand Up @@ -44,6 +34,11 @@ jobs:
run: |
pnpm install
- name: Copy .env.example to .env
run: |
cp .env.example .env
working-directory: packages/interface

- name: Build
run: |
pnpm build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coordinator-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
- name: Build
run: |
pnpm run build
working-directory: packages/coordinator

- name: Run hardhat
run: |
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/coordinator-deploy.yml

This file was deleted.

14 changes: 5 additions & 9 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ on:
pull_request:

env:
NEXT_PUBLIC_CHAIN_NAME: ${{ vars.NEXT_PUBLIC_CHAIN_NAME }}
NEXT_PUBLIC_ADMIN_ADDRESS: ${{ vars.NEXT_PUBLIC_ADMIN_ADDRESS }}
NEXT_PUBLIC_APPROVAL_SCHEMA: ${{ vars.NEXT_PUBLIC_APPROVAL_SCHEMA }}
NEXT_PUBLIC_METADATA_SCHEMA: ${{ vars.NEXT_PUBLIC_METADATA_SCHEMA }}
NEXT_PUBLIC_ROUND_ID: ${{ vars.NEXT_PUBLIC_ROUND_ID }}
NEXT_PUBLIC_MACI_ADDRESS: ${{ vars.NEXT_PUBLIC_MACI_ADDRESS }}
NEXT_PUBLIC_TALLY_URL: ${{ vars.NEXT_PUBLIC_TALLY_URL }}
NEXT_PUBLIC_WALLETCONNECT_ID: ${{ secrets.NEXT_PUBLIC_WALLETCONNECT_ID }}
NEXT_PUBLIC_FEEDBACK_URL: ${{ vars.NEXT_PUBLIC_FEEDBACK_URL }}
NEXT_PUBLIC_MACI_START_BLOCK: ${{ vars.NEXT_PUBLIC_MACI_START_BLOCK }}
NEXT_PUBLIC_MACI_SUBGRAPH_URL: ${{ vars.NEXT_PUBLIC_MACI_SUBGRAPH_URL }}
Expand All @@ -32,7 +24,6 @@ env:
NEXT_PUBLIC_VOTING_END_DATE: ${{ vars.NEXT_PUBLIC_VOTING_END_DATE }}
NEXT_PUBLIC_RESULTS_DATE: ${{ vars.NEXT_PUBLIC_RESULTS_DATE }}
TEST_MNEMONIC: ${{ secrets.TEST_MNEMONIC }}
WALLET_PRIVATE_KEY: ""

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -86,6 +77,11 @@ jobs:
pnpm run install:chromium
working-directory: packages/interface

- name: Copy .env.example to .env
run: |
cp .env.example .env
working-directory: packages/interface

- name: Build
run: pnpm run build
working-directory: packages/interface
Expand Down
8 changes: 4 additions & 4 deletions packages/interface/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ NEXT_PUBLIC_ALCHEMY_ID=

# WalletConnect (optional to support more wallets)
# Get your projectId at https://cloud.walletconnect.com
NEXT_PUBLIC_WALLETCONNECT_ID=
NEXT_PUBLIC_WALLETCONNECT_ID="21fef48091f12692cad574a6f7753643"

# -----------------
# APP CONFIGURATION
# -----------------

# Event title for the round, just for display
NEXT_PUBLIC_EVENT_NAME="ETH GLOBAL"
NEXT_PUBLIC_EVENT_NAME="Devcon"

# Unique identifier for your applications and lists - your app will group attestations by this id
NEXT_PUBLIC_ROUND_ID="open-rpgf-1"
Expand All @@ -45,7 +45,7 @@ NEXT_PUBLIC_FEEDBACK_URL=https://github.com/privacy-scaling-explorations/maci-pl

# address that will approve applications and voters
# (leaving empty means anyone can do this)
NEXT_PUBLIC_ADMIN_ADDRESS=
NEXT_PUBLIC_ADMIN_ADDRESS="0x0000000000000000000000000000000000000000"

# -----------------
# EAS CONFIGURATION
Expand Down Expand Up @@ -74,7 +74,7 @@ NEXT_PUBLIC_SEMAPHORE_SUBGRAPH=
# Do this if the schemas doesn't exist on the network you're using.
WALLET_PRIVATE_KEY=""

NEXT_PUBLIC_MACI_ADDRESS=
NEXT_PUBLIC_MACI_ADDRESS="0x0000000000000000000000000000000000000000"

NEXT_PUBLIC_MACI_START_BLOCK=

Expand Down
12 changes: 9 additions & 3 deletions packages/interface/e2e/connectWallet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ test.describe("connect wallet", () => {
await page.getByRole("button", { name: "Connect wallet" }).first().click();
await page.getByTestId("rk-wallet-option-io.metamask").click();

const metamask = await page.context().waitForEvent("page");
const metamask = await page.context().waitForEvent("page", { timeout: 30000 });
await metamask.getByText("Next").waitFor({ state: "visible", timeout: 10000 });
await metamask.getByText("Next").click();

// Wait for the footer next button to be visible and clickable
await metamask.getByTestId("page-container-footer-next").waitFor({ state: "visible", timeout: 10000 });
await metamask.getByTestId("page-container-footer-next").click();

await metamask.waitForTimeout(2_000);
// Replace fixed timeout with a wait for a specific element or state change
await metamask.getByTestId("page-container-footer-next").waitFor({ state: "visible", timeout: 10000 });
await metamask.getByTestId("page-container-footer-next").click();

await expect(page.getByText(/0xf3.+2266/)).toBeInViewport();
// Wait for the wallet address to appear with a timeout
await expect(page.getByText(/0xf3.+2266/)).toBeInViewport({ timeout: 20000 });
});
});

0 comments on commit c5ba817

Please sign in to comment.