Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
update testing
Browse files Browse the repository at this point in the history
  • Loading branch information
patcher9 committed Mar 14, 2024
1 parent f8c0ec7 commit 8f143a8
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 24 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,7 @@ on:
permissions:
contents: write

env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_TOKEN }}
COHERE_API_TOKEN: ${{ secrets.COHERE_API_TOKEN }}
ANTHROPIC_API_TOKEN: ${{ secrets.ANTHROPIC_API_TOKEN }}
DOKU_URL: ${{ secrets.DOKU_URL }}
DOKU_TOKEN: ${{ secrets.DOKU_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'

- run: npm ci

- name: NPM Test
run: npm test

publish:
needs: build
runs-on: ubuntu-latest
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Docker
uses: docker/setup-action@v2

- name: Setup Doku Stack
run: docker-compose up -d

- name: Sleep for 30 seconds
run: sleep 30

- name: Make API Request and Set DOKU_TOKEN
run: |
RESPONSE=$(curl --request POST \
--url https://127.0.0.1:9044/api/keys \
--header 'Authorization: ""' \
--header 'Content-Type: application/json' \
--data '{"name": "GITHUB"}' )
MESSAGE=$(echo $RESPONSE | jq -r '.message')
echo "DOKU_TOKEN=${MESSAGE}" >> $GITHUB_ENV
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
52 changes: 52 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: '3.8'

services:
clickhouse:
image: clickhouse/clickhouse-server:24.1.5
container_name: clickhouse
environment:
CLICKHOUSE_PASSWORD: ${DOKU_DB_PASSWORD:-DOKU}
CLICKHOUSE_USER: ${DOKU_DB_USER:-default}
volumes:
- clickhouse-data:/var/lib/clickhouse
ports:
- "9000:9000"
- "8123:8123"
restart: always

doku-ingester:
image: ghcr.io/dokulabs/doku-ingester:latest
container_name: doku-ingester
environment:
DOKU_DB_HOST: clickhouse
DOKU_DB_PORT: 9000
DOKU_DB_NAME: ${DOKU_DB_NAME:-default}
DOKU_DB_USER: ${DOKU_DB_USER:-default}
DOKU_DB_PASSWORD: ${DOKU_DB_PASSWORD:-DOKU}
ports:
- "9044:9044"
depends_on:
- clickhouse
restart: always

doku-client:
image: ghcr.io/dokulabs/doku-client:latest
container_name: doku-client
environment:
INIT_DB_HOST: clickhouse
INIT_DB_PORT: 8123
INIT_DB_DATABASE: ${DOKU_DB_NAME:-default}
INIT_DB_USERNAME: ${DOKU_DB_USER:-default}
INIT_DB_PASSWORD: ${DOKU_DB_PASSWORD:-DOKU}
SQLITE_DATABASE_URL: file:/app/client/data/data.db
ports:
- "3000:3000"
depends_on:
- clickhouse
volumes:
- doku-client-data:/app/client/data
restart: always

volumes:
clickhouse-data:
doku-client-data:

0 comments on commit 8f143a8

Please sign in to comment.