Skip to content

test4

test4 #8

Workflow file for this run

name: Test
on:
push:
branches: [develop*, main]
pull_request:
branches: [develop*, main]
jobs:
bun-test:
runs-on: ubuntu-latest
environment: dev-test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install bun
uses: oven-sh/setup-bun@v1
- name: "Install Dependencies"
run: |
bun install
- name: "Setup local Clickhouse DB"
uses: metrico/[email protected]
- name: "Insert mock data into Clickhouse DB for testing"
run: |
curl https://clickhouse.com/ | sh
echo "CREATE TABLE TotalSupply (address FixedString(40), supply Nullable(String), block Nullable(String), timestamp Nullable(String)) ENGINE = MergeTree() ORDER BY (address); CREATE TABLE Contracts (address FixedString(40), name Nullable(String), symbol Nullable(String), decimals Nullable(String)) ENGINE = MergeTree() ORDER BY (address); CREATE TABLE balance_changes (contract FixedString(40), owner Nullable(String), old_balance Nullable(String), new_balance Nullable(String), transaction_id Nullable(String), block_num Nullable(String), timestamp Nullable(String)) ENGINE = MergeTree() ORDER BY (contract); INSERT INTO TotalSupply (address, supply, block, timestamp) VALUES ('cb9df5dc2ed5d7d3972f601acfe35cdbe57341e0', '100000', '1004162', '1459426268') INSERT INTO Contracts (address, name, symbol, decimals) VALUES ('cb9df5dc2ed5d7d3972f601acfe35cdbe57341e0', 'wing', 'wing', '8');" > setup.sql
./clickhouse client --queries-file ./setup.sql
- name: "Run test"
run: |
bun test
env:
HOSTNAME: ${{ vars.HOSTNAME }}
PORT: ${{ vars.PORT }}
DB_HOST: ${{ vars.DB_HOST }}
DB_NAME: ${{ secrets.DB_NAME }}
DB_USERNAME: ${{ secrets.USERNAME }}
DB_PASSWORD: ""