FEAT : ADD CI
This commit is contained in:
parent
6693186d40
commit
0048e81666
19
.github/workflows/qodana_code_quality.yml
vendored
Normal file
19
.github/workflows/qodana_code_quality.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
name: Qodana
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
qodana:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: 'Qodana Scan'
|
||||||
|
uses: JetBrains/qodana-action@v2023.3
|
||||||
|
env:
|
||||||
|
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
|
@ -1,7 +1,7 @@
|
|||||||
from discord import ApplicationContext, DiscordException, slash_command, Color
|
from discord import ApplicationContext, DiscordException, slash_command, Color
|
||||||
from discord.ext.commands import Cog, cooldown, BucketType, has_permissions, guild_only, Context
|
from discord.ext.commands import Cog, cooldown, BucketType, has_permissions, guild_only, Context
|
||||||
|
|
||||||
from RUNA.UI.Embed import Default_Embed, ChristmasEmbed
|
from RUNA.UI.Embed import Default_Embed, RunaEmbed
|
||||||
from RUNA.UI.Buttons import Recommanded
|
from RUNA.UI.Buttons import Recommanded
|
||||||
from RUNA.Database import database
|
from RUNA.Database import database
|
||||||
from RUNA.Module import get_gpuserver_status, Get_Backend_latency
|
from RUNA.Module import get_gpuserver_status, Get_Backend_latency
|
||||||
@ -39,7 +39,7 @@ class CogUtil(Cog):
|
|||||||
@slash_command(name="봇정보", description="봇의 정보를 확인합니다.")
|
@slash_command(name="봇정보", description="봇의 정보를 확인합니다.")
|
||||||
async def _info(self, ctx: Context):
|
async def _info(self, ctx: Context):
|
||||||
if not await database.get_guild(ctx.guild.id): return await ctx.respond(
|
if not await database.get_guild(ctx.guild.id): return await ctx.respond(
|
||||||
embed=ChristmasEmbed(title="❌ 에러!", description="서버가 가입되어있지 않아요! 서버를 가입해주세요!", color=Color.red()),
|
embed=RunaEmbed(title="❌ 에러!", description="서버가 가입되어있지 않아요! 서버를 가입해주세요!", color=Color.red()),
|
||||||
ephemeral=True)
|
ephemeral=True)
|
||||||
data = await get_gpuserver_status(url=None)
|
data = await get_gpuserver_status(url=None)
|
||||||
await ctx.respond(embed=Default_Embed.BotInfo(data, bot=self.bot))
|
await ctx.respond(embed=Default_Embed.BotInfo(data, bot=self.bot))
|
||||||
@ -58,3 +58,5 @@ class CogUtil(Cog):
|
|||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot.add_cog(CogUtil(bot))
|
bot.add_cog(CogUtil(bot))
|
||||||
|
|
||||||
|
|
||||||
|
29
qodana.yaml
Normal file
29
qodana.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#-------------------------------------------------------------------------------#
|
||||||
|
# Qodana analysis is configured by qodana.yaml file #
|
||||||
|
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
|
||||||
|
#-------------------------------------------------------------------------------#
|
||||||
|
version: "1.0"
|
||||||
|
|
||||||
|
#Specify inspection profile for code analysis
|
||||||
|
profile:
|
||||||
|
name: qodana.starter
|
||||||
|
|
||||||
|
#Enable inspections
|
||||||
|
#include:
|
||||||
|
# - name: <SomeEnabledInspectionId>
|
||||||
|
|
||||||
|
#Disable inspections
|
||||||
|
#exclude:
|
||||||
|
# - name: <SomeDisabledInspectionId>
|
||||||
|
# paths:
|
||||||
|
# - <path/where/not/run/inspection>
|
||||||
|
|
||||||
|
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
|
||||||
|
#bootstrap: sh ./prepare-qodana.sh
|
||||||
|
|
||||||
|
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
|
||||||
|
#plugins:
|
||||||
|
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
|
||||||
|
|
||||||
|
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
|
||||||
|
linter: jetbrains/qodana-python:latest
|
Loading…
Reference in New Issue
Block a user