Skip to content

Commit

Permalink
update ci.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Oct 8, 2023
1 parent 6341750 commit 2f9542c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
9 changes: 6 additions & 3 deletions packages/apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
12 changes: 5 additions & 7 deletions packages/apps/src/utils/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 2f9542c

Please sign in to comment.