Fix/nodekwil logout #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened, ready_for_review ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
if: ${{ !github.event.pull_request.draft }} # only run on non-draft PRs | |
services: | |
postgres: | |
image: kwildb/postgres:latest | |
env: | |
POSTGRES_PORT: 5432 | |
POSTGRES_HOST_AUTH_METHOD: trust | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Cache Node.js modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.x' | |
check-latest: true | |
- name: Install Taskfile | |
uses: arduino/setup-task@v2 | |
- name: Set up KwilDB Docker | |
run: | | |
git clone https://github.com/kwilteam/kwil-db.git /tmp/kwil-db | |
cd /tmp/kwil-db | |
go work init && go work use . ./test ./core | |
task build:docker | |
cd deployments/compose/kwil | |
echo "Starting kwil docker" | |
docker compose up -d | |
cd - | |
- name: Install and build kwiljs | |
run: | | |
npm install | |
npm run build | |
- name: Run integration tests | |
run: | | |
chain_id=`curl -s http://localhost:8080/api/v1/chain_info | jq -r .chain_id` | |
echo "Chain ID: $chain_id" | |
echo "run KWIL-JS TEST against kwild(http:localhost:8080), with $chain_id" | |
PRIVATE_KEY=0000000000000000000000000000000000000000000000000000000000000001 CHAIN_ID=$chain_id GATEWAY_ON=false GAS_ON=false KWIL_PROVIDER=http://localhost:8080 npm run integration | |
- name: Cleanup Docker | |
if: always() | |
run: | | |
docker compose -f /tmp/kwil-db/deployments/compose/kwil/docker-compose.yml down | |
docker system prune -af |