From 837b93785a1ce641fe9825a26050e6a7d669d1fd Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:43:26 +0100 Subject: [PATCH] chore(ci): use .env.example for ci tests --- .github/workflows/contracts-build.yml | 4 ++++ .github/workflows/coordinator-build.yml | 7 +++++-- .github/workflows/e2e.yml | 10 ++++------ packages/coordinator/.env.example | 2 -- packages/interface/.env.example | 8 ++++---- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/contracts-build.yml b/.github/workflows/contracts-build.yml index 734acf44..d54bbb0b 100644 --- a/.github/workflows/contracts-build.yml +++ b/.github/workflows/contracts-build.yml @@ -40,6 +40,10 @@ jobs: run: | pnpm install --frozen-lockfile --prefer-offline + - name: Copy .env.example to .env + run: | + cp packages/interface/.env.example packages/interface/.env + - name: Build run: | pnpm run build diff --git a/.github/workflows/coordinator-build.yml b/.github/workflows/coordinator-build.yml index 7e881668..a51c81c7 100644 --- a/.github/workflows/coordinator-build.yml +++ b/.github/workflows/coordinator-build.yml @@ -41,8 +41,6 @@ env: NEXT_PUBLIC_VOTING_END_DATE: ${{ vars.NEXT_PUBLIC_VOTING_END_DATE }} NEXT_PUBLIC_RESULTS_DATE: ${{ vars.NEXT_PUBLIC_RESULTS_DATE }} NEXT_PUBLIC_POLL_MODE: ${{ vars.NEXT_PUBLIC_POLL_MODE }} - TEST_MNEMONIC: ${{ secrets.TEST_MNEMONIC }} - WALLET_PRIVATE_KEY: "" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -78,6 +76,11 @@ jobs: run: | pnpm install --frozen-lockfile --prefer-offline + - name: Copy .env.example to .env + run: | + cp packages/coordinator/.env.example packages/coordinator/.env + cp packages/interface/.env.example packages/interface/.env + - name: Build run: | pnpm run build diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5b3d0de4..9da03a2a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -5,10 +5,6 @@ on: schedule: - cron: "0 9 * * *" # run every day at 9:00 UTC - push: - branches: [main] - pull_request: - env: NEXT_PUBLIC_CHAIN_NAME: ${{ vars.NEXT_PUBLIC_CHAIN_NAME }} NEXT_PUBLIC_ADMIN_ADDRESS: ${{ vars.NEXT_PUBLIC_ADMIN_ADDRESS }} @@ -33,8 +29,6 @@ env: NEXT_PUBLIC_VOTING_END_DATE: ${{ vars.NEXT_PUBLIC_VOTING_END_DATE }} NEXT_PUBLIC_RESULTS_DATE: ${{ vars.NEXT_PUBLIC_RESULTS_DATE }} NEXT_PUBLIC_POLL_MODE: ${{ vars.NEXT_PUBLIC_POLL_MODE }} - TEST_MNEMONIC: ${{ secrets.TEST_MNEMONIC }} - WALLET_PRIVATE_KEY: "" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -88,6 +82,10 @@ 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 diff --git a/packages/coordinator/.env.example b/packages/coordinator/.env.example index 067c41dc..22628679 100644 --- a/packages/coordinator/.env.example +++ b/packages/coordinator/.env.example @@ -44,5 +44,3 @@ SUBGRAPH_DEPLOY_KEY= # Subgraph project folder SUBGRAPH_FOLDER=./node_modules/maci-subgraph - - diff --git a/packages/interface/.env.example b/packages/interface/.env.example index a0587600..48ae6adc 100644 --- a/packages/interface/.env.example +++ b/packages/interface/.env.example @@ -24,10 +24,10 @@ NEXT_PUBLIC_WALLETCONNECT_ID= # ----------------- # Event title for the round, just for display -NEXT_PUBLIC_EVENT_NAME="ETH GLOBAL" +NEXT_PUBLIC_EVENT_NAME="MACI PLATFORM" # Unique identifier for your applications and lists - your app will group attestations by this id -NEXT_PUBLIC_ROUND_ID="open-rpgf-1" +NEXT_PUBLIC_ROUND_ID="maci-platform-1" # Event title for the round, just for display NEXT_PUBLIC_ROUND_ORGANIZER="PSE" @@ -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 @@ -77,7 +77,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=