Skip to content

wip! add loglines

wip! add loglines #127

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
jobs:
xtp:
runs-on: ubuntu-latest
env:
XTP_TOKEN: ${{ secrets.XTP_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: test the schema
run: |
body="$(jq -rcM -n --arg content "$(cat plugin.yaml)" '{"name":"chat_test", "schema": $content}')"
EXTENSION_ID=ext_01j8t7m4s6e0trqftejwvh1je5
curl -sLfi \
-H "Authorization: Bearer $XTP_TOKEN" \
-H "content-type: application/json" \
-X PUT -d "$body" \
'https://xtp.dylibso.com/api/v1/extension-points/'$EXTENSION_ID
test:
needs: [xtp]
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
PGURL: postgres://postgres:postgres@localhost:5432/postgres
FORCE_PRETTY_OUTPUT: true
HOST_SECRET: stub value
DISCORD_BOT_TOKEN: stub value
DISCORD_BOT_CLIENT_ID: stub value
SESSION_SECRET: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa any value is fine as long as its 32 chars long"
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '22.x'
- name: cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-discordbot-npm-cache-${{ hashFiles('service/api/package-lock.json') }}
restore-keys: |
${{ runner.os }}-discordbot-npm-cache-
- name: install deps
run: |
npm ci
- name: migrate
run: |
npm run migrate
- name: run tests
run: |
TEST_LOG=1 npm t