mirror of
https://github.com/kevinthedang/discord-ollama.git
synced 2026-08-08 23:54:01 -04:00
Compare commits
4
Commits
v0.9.0
...
e0888c4d7c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0888c4d7c | ||
|
|
0124da5027 | ||
|
|
effcc1fd15 | ||
|
|
b492d8f62f |
@@ -1,5 +1,6 @@
|
|||||||
name: Builds
|
name: Builds
|
||||||
run-name: Validate Node and Docker Builds
|
run-name: Validate Node and Docker Builds
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -9,15 +10,16 @@ jobs:
|
|||||||
Discord-Node-Build: # test if the node install and run
|
Discord-Node-Build: # test if the node install and run
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Node Environment lts/jod
|
- name: Set up Node Environment
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: lts/jod
|
node-version: lts/jod
|
||||||
cache: "npm"
|
cache: npm
|
||||||
|
|
||||||
- name: Install Project Dependencies
|
- name: Install Project Dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -48,11 +50,11 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Node Environment lts/jod
|
- name: Set up Node Environment
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: lts/jod
|
node-version: lts/jod
|
||||||
cache: "npm"
|
cache: npm
|
||||||
|
|
||||||
- name: Create Environment Variables
|
- name: Create Environment Variables
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
name: Coverage
|
name: Coverage
|
||||||
run-name: Code Coverage
|
run-name: Code Coverage
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
@@ -8,21 +12,21 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
Discord-Node-Coverage:
|
Discord-Node-Coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: coverage
|
# environment: coverage
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Node Environment lts/jod
|
- name: Set up Node Environment
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: lts/jod
|
node-version: lts/jod
|
||||||
cache: "npm"
|
cache: npm
|
||||||
|
|
||||||
- name: Install Project Dependencies
|
- name: Install Project Dependencies
|
||||||
run: |
|
run: npm install
|
||||||
npm install
|
|
||||||
|
|
||||||
- name: Create Environment Variables
|
- name: Create Environment Variables
|
||||||
run: |
|
run: |
|
||||||
@@ -32,19 +36,11 @@ jobs:
|
|||||||
echo OLLAMA_PORT = ${{ secrets.OLLAMA_PORT }} >> .env
|
echo OLLAMA_PORT = ${{ secrets.OLLAMA_PORT }} >> .env
|
||||||
echo MODEL = ${{ secrets.MODEL }} >> .env
|
echo MODEL = ${{ secrets.MODEL }} >> .env
|
||||||
|
|
||||||
- name: Collect Code Coverage
|
- name: Run tests with coverage
|
||||||
run: |
|
run: npm run coverage
|
||||||
LINE_PCT=$(npm run coverage | tail -2 | head -1 | awk '{print $3}')
|
|
||||||
echo "COVERAGE=$LINE_PCT" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Upload Code Coverage
|
- name: Upload Coverage to Codecov
|
||||||
uses: schneegans/dynamic-badges-action@v1.7.0
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
auth: ${{ secrets.GIST_SECRET }}
|
files: coverage/lcov.info
|
||||||
gistID: ${{ vars.GIST_ID }}
|
fail_ci_if_error: true
|
||||||
filename: coverage.json
|
|
||||||
label: Coverage
|
|
||||||
message: ${{ env.COVERAGE }}
|
|
||||||
valColorRange: ${{ env.COVERAGE }}
|
|
||||||
maxColorRange: 100
|
|
||||||
minColorRange: 0
|
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
name: Deploy
|
name: Deploy
|
||||||
run-name: Deploy Application Latest
|
run-name: Deploy Application Latest
|
||||||
# on:
|
|
||||||
# push:
|
|
||||||
# tags:
|
|
||||||
# - 'v*'
|
|
||||||
on: workflow_dispatch
|
on: workflow_dispatch
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -11,6 +8,7 @@ jobs:
|
|||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
environment: deploy
|
environment: deploy
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -40,7 +38,7 @@ jobs:
|
|||||||
git clone https://github.com/kevinthedang/discord-ollama.git ${{ secrets.PATH }}
|
git clone https://github.com/kevinthedang/discord-ollama.git ${{ secrets.PATH }}
|
||||||
cd ${{ secrets.PATH }}
|
cd ${{ secrets.PATH }}
|
||||||
|
|
||||||
- name: Install nvm and Node.js lts/jod
|
- name: Install nvm and Node.js
|
||||||
run: |
|
run: |
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
|
||||||
export NVM_DIR="$HOME/.nvm"
|
export NVM_DIR="$HOME/.nvm"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
name: Tests
|
name: Tests
|
||||||
run-name: Unit Tests
|
run-name: Unit Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
@@ -21,15 +22,16 @@ jobs:
|
|||||||
Discord-Node-Test:
|
Discord-Node-Test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Node Environment lts/jod
|
- name: Set up Node Environment
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: lts/jod
|
node-version: lts/jod
|
||||||
cache: "npm"
|
cache: npm
|
||||||
|
|
||||||
- name: Install Project Dependencies
|
- name: Install Project Dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml"><img alt="Builds" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml/badge.svg" /></a>
|
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml"><img alt="Builds" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/build.yml/badge.svg" /></a>
|
||||||
<!-- <a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/deploy.yml"><img alt="Deploy Status" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/deploy.yml/badge.svg" /></a> -->
|
<!-- <a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/deploy.yml"><img alt="Deploy Status" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/deploy.yml/badge.svg" /></a> -->
|
||||||
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml"><img alt="Tests" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml/badge.svg" /></a>
|
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml"><img alt="Tests" src="https://github.com/kevinthedang/discord-ollama/actions/workflows/test.yml/badge.svg" /></a>
|
||||||
<a href="#"></a><a href="https://github.com/kevinthedang/discord-ollama/actions/workflows/coverage.yml"><img alt="Code Coverage" src="https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kevinthedang/bc7b5dcfa16561ab02bb3df67a99b22d/raw/coverage.json"></a>
|
<a href="https://codecov.io/gh/kevinthedang/discord-ollama"><img src="https://img.shields.io/codecov/c/github/kevinthedang/discord-ollama?logo=codecov" alt="coverage" /></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## About/Goals
|
## About/Goals
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ services:
|
|||||||
build: ./ # find docker file in designated path
|
build: ./ # find docker file in designated path
|
||||||
container_name: discord
|
container_name: discord
|
||||||
restart: always # rebuild container always
|
restart: always # rebuild container always
|
||||||
image: kevinthedang/discord-ollama:0.9.0
|
image: kevinthedang/discord-ollama:0.9.1
|
||||||
environment:
|
environment:
|
||||||
CLIENT_TOKEN: ${CLIENT_TOKEN}
|
CLIENT_TOKEN: ${CLIENT_TOKEN}
|
||||||
OLLAMA_IP: ${OLLAMA_IP}
|
OLLAMA_IP: ${OLLAMA_IP}
|
||||||
|
|||||||
Generated
+484
-384
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "discord-ollama",
|
"name": "discord-ollama",
|
||||||
"version": "0.9.0",
|
"version": "0.9.1",
|
||||||
"description": "Ollama Integration into discord",
|
"description": "Ollama Integration into discord",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"exports": "./build/index.js",
|
"exports": "./build/index.js",
|
||||||
|
|||||||
+3
-2
@@ -6,8 +6,9 @@ export default defineConfig({
|
|||||||
globals: true, // <-- reduces test file imports
|
globals: true, // <-- reduces test file imports
|
||||||
reporters: ['verbose'], // <-- verbose output
|
reporters: ['verbose'], // <-- verbose output
|
||||||
coverage: {
|
coverage: {
|
||||||
exclude: [...configDefaults.exclude, 'build/*', 'tests/*'], // <-- exclude JS build
|
include: ['src/**/*.ts'],
|
||||||
reporter: ['text-summary'] // <-- report in text-summary
|
reporter: 'lcov',
|
||||||
|
reportsDirectory: './coverage'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user