Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
killroy192 committed Aug 10, 2024
1 parent 72aef93 commit 5142c0e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/quality-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,28 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: npm run typecheck;
- run: npm run lint
test:
- run: make lint
typecheck:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Run typecheck
run: make typecheck
test:
needs: typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Run unit tests
run: npm run test
run: make test
build:
env:
NODE_PK: "0x0000000000000000000000000000000000000000000000000000000000000000"
RPC: "https://rpc.com"
WS_RPC: "wss://ethereum.publicnode.com"
NETWORK: "mainnet"
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: docker compose build;
run: make buildprod;
13 changes: 5 additions & 8 deletions .github/workflows/release.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ permissions:

jobs:
build:
env:
NODE_PK: ${{ secrets.NODE_PK }}
RPC: ${{ secrets.RPC }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: docker compose build;
run: make buildprod;
deploy:
runs-on: ubuntu-latest
steps:
Expand All @@ -43,9 +40,9 @@ jobs:
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: cd /root/automation-node;
export NODE_PK=${{ secrets.NODE_PK }} RPC=${{ secrets.RPC }} WS_RPC=${{ secrets.WS_RPC}} NETWORK=${{ env.NETWORK }};
docker compose down;
printf 'NETWORK=%s \nNODE_ENV=production \n' "${{ env.NETWORK }}" >conf/.env
printf 'DOTENV_PRIVATE_KEY_SECRETS_ENV=%s\n' "${{ secrets.DOTENV_PRIVATE_KEY_SECRETS_ENV }}" >conf/.env.keys
make clearprod;
docker builder prune -a -f;
docker image prune -a -f;
docker compose create;
docker compose up -d
make upprod;
2 changes: 1 addition & 1 deletion conf/.example.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://viem.sh/docs/chains/introduction
NETWORK="mainnet"

NODE_ENV=development
NODE_ENV=production

0 comments on commit 5142c0e

Please sign in to comment.