Skip to content

Commit

Permalink
Merge pull request #5 from Rei-666/githubActions
Browse files Browse the repository at this point in the history
Fix release tests
  • Loading branch information
Rei-x committed May 20, 2021
2 parents b8c1137 + be1fb12 commit ef27b79
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 157 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ jobs:
with:
node-version: 12
- run: npm ci
- run: npm run build

- run: npm run lint && npm run coverage
env:
BOT_TOKEN: ${{secrets.BOT_TOKEN}}
TESTBOT_TOKEN: ${{secrets.TESTBOT_TOKEN}}
GUILD_ID: ${{secrets.GUILD_ID}}
WITAI_KEY: ${{secrets.WITAI_KEY}}
publish-npm:
needs: build
runs-on: ubuntu-latest
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- run: npm ci
- run: npm run lint && npm run coverage
env:
BOT_TOKEN: ${{secrets.BOT_TOKEN}}
TESTBOT_TOKEN: ${{secrets.TESTBOT_TOKEN}}
GUILD_ID: ${{secrets.GUILD_ID}}
WITAI_KEY: ${{secrets.WITAI_KEY}}
DEBUG: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ coverage
.nyc_output
recordings
tsconfig.tsbuildinfo
.env
.env
Dockerfile
.dockerignore
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run build
npm run lint
3 changes: 1 addition & 2 deletions examples/advancedBot.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {DiscordSR} from '../src/index';
import {BOT_TOKEN} from '../config.json';
import {Client, MessageEmbed} from 'discord.js';
import {VoiceMessage} from '../src/bot/voiceMessage';

Expand Down Expand Up @@ -31,4 +30,4 @@ client.on('speech', (message: VoiceMessage) => {
}
});

client.login(BOT_TOKEN);
client.login('token');
Loading

0 comments on commit ef27b79

Please sign in to comment.