Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nhynes committed Nov 4, 2024
1 parent ad397ff commit f43973c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install dependencies
run: poetry install

- name: Run Black
run: poetry run black --check fun_game tests

- name: Run MyPy
run: poetry run mypy fun_game tests

- name: Run Pylint
run: poetry run pylint fun_game tests

- name: Run Tests
run: poetry run pytest
4 changes: 3 additions & 1 deletion fun_game/frontends/discord/cogs/sudo_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ async def show_rules(self, interaction: discord.Interaction):
prefix="",
)
if not replies:
await interaction.response.send_message("There are no custom rules yet.", ephemeral=True)
await interaction.response.send_message(
"There are no custom rules yet.", ephemeral=True
)
return

for reply in replies:
Expand Down
5 changes: 4 additions & 1 deletion tests/test_engine.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import pytest
# pylint: disable=redefined-outer-name,protected-access

from unittest.mock import AsyncMock, Mock, MagicMock

import pytest

from fun_game.config import (
GameConfig,
FilterConfig,
Expand Down

0 comments on commit f43973c

Please sign in to comment.