diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed8d860e3..f9b8c912f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,10 +5,10 @@ name: CI # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the "main" branch - push: - branches: [ "main" ] + # push: + # branches: [ "main" ] pull_request: - branches: [ "main" ] + # branches: [ "main" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -27,8 +27,15 @@ jobs: - uses: actions/checkout@v3 # Runs a set of commands using the runners shell - - name: Install and Build + - name: Install + run: npm install + + - name: Lint and Test + run: | + npm run lint + npm run test + + - name: Build run: | - npm install - npm run build:helix.js npm run build:apps + npm run build:apps:test diff --git a/package.json b/package.json index 4446d14a2..a70d49401 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,16 @@ "description": "Helix UI", "private": true, "scripts": { - "bootstrap": "npm install", - "lint:apps": "npm run lint -w apps", "dev:apps": "npm run dev -w apps", - "build:apps:test": "npm run build -w apps", - "build:helix.js": "npm run build -w helix.js", - "start:apps:test": "npm run start -w apps", + "dev:apps:test": "npm run dev:test -w apps", + "build:apps": "npm run build -w apps", + "build:apps:test": "npm run build:test -w apps", + "start:apps": "npm run start -w apps", + "start:apps:test": "npm run start:test -w apps", "prettier": "prettier '**/*.{js,jsx,ts,tsx,json}' --write", - "test": "echo \"Error: no test specified\" && exit 1", + "lint": "npm run lint -w apps", + "test": "npm run test -w apps", + "bootstrap": "npm install", "prepare": "husky install" }, "workspaces": [ diff --git a/packages/apps/package.json b/packages/apps/package.json index 9dc4ddfc4..e776a1142 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -3,9 +3,12 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "NODE_ENV=test next dev -p 3030", - "build": "NODE_ENV=test next build", - "start": "NODE_ENV=test next start", + "dev": "next dev -p 3030", + "dev:test": "NODE_ENV=test next dev -p 3030", + "build": "next build", + "build:test": "NODE_ENV=test next build", + "start": "next start", + "start:test": "NODE_ENV=test next start", "lint": "next lint", "test": "jest" }, diff --git a/packages/apps/src/utils/chain.ts b/packages/apps/src/utils/chain.ts index 8999adc0d..6e896d564 100644 --- a/packages/apps/src/utils/chain.ts +++ b/packages/apps/src/utils/chain.ts @@ -67,11 +67,9 @@ export function getChainsConfig() { zksyncGoerliChain, ]; - return all.filter((c) => !c.hidden); - - // if (process.env.NODE_ENV === "production") { - // return all.filter((c) => !c.hidden && !c.testnet); - // } else { - // return all.filter((c) => !c.hidden && !!c.testnet); - // } + if (process.env.NODE_ENV === "production") { + return all.filter((c) => !c.hidden && !c.testnet); + } else { + return all.filter((c) => !c.hidden && !!c.testnet); + } }