Skip to content

Commit c233bca

Browse files
committed
try add ci
1 parent 81f9131 commit c233bca

File tree

7 files changed

+91
-12
lines changed

7 files changed

+91
-12
lines changed

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
spelling:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
13+
- name: Check spelling
14+
uses: crate-ci/typos@master
15+
16+
pyright:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
path: console_mod_menu
24+
25+
- name: Checkout stubs
26+
uses: actions/checkout@v4
27+
with:
28+
repository: bl-sdk/pyunrealsdk
29+
path: pyunrealsdk
30+
sparse-checkout: |
31+
stubs
32+
33+
- name: Checkout mods_base
34+
uses: actions/checkout@v4
35+
with:
36+
repository: bl-sdk/mods_base
37+
path: mods_base
38+
39+
- name: Add stubs to pyproject
40+
run: >
41+
sed
42+
's/# CI ADD STUB PATH HERE/stubPath = "pyunrealsdk\/stubs"\nreportMissingModuleSource = false/'
43+
console_mod_menu/pyproject.toml
44+
> pyproject.toml
45+
46+
- name: Run pyright
47+
uses: jakebailey/pyright-action@v2
48+
with:
49+
extra-args: console_mod_menu
50+
51+
ruff:
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
57+
with:
58+
path: console_mod_menu
59+
60+
- name: Checkout mods_base
61+
uses: actions/checkout@v4
62+
with:
63+
repository: bl-sdk/mods_base
64+
path: mods_base
65+
66+
- name: Run Ruff Linting
67+
uses: chartboost/ruff-action@v1
68+
with:
69+
args: check console_mod_menu
70+
71+
- name: Run Ruff Formatting
72+
uses: chartboost/ruff-action@v1
73+
with:
74+
args: format --check console_mod_menu

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ pythonVersion = "3.13"
33
typeCheckingMode = "strict"
44
pythonPlatform = "Windows"
55

6+
# CI ADD STUB PATH HERE
7+
68
[tool.ruff]
79
target-version = "py313"
810
line-length = 100

screens/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from abc import ABC, abstractmethod
22
from dataclasses import dataclass
33

4-
from console_mod_menu.draw import draw
54
from mods_base import capture_next_console_line
65

6+
from console_mod_menu.draw import draw
7+
78

89
@dataclass
910
class AbstractScreen(ABC):

screens/home.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from dataclasses import dataclass, field
22
from typing import Literal
33

4-
from console_mod_menu.draw import draw
54
from mods_base import Mod, get_ordered_mod_list, html_to_plain_text
65

6+
from console_mod_menu.draw import draw
7+
78
from . import (
89
AbstractScreen,
910
draw_stack_header,

screens/keybind.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
from dataclasses import dataclass, field
44
from typing import TYPE_CHECKING
55

6-
from unrealsdk.hooks import Block
7-
8-
from console_mod_menu.draw import draw
9-
from console_mod_menu.key_matching import KNOWN_KEYS, suggest_keys
106
from mods_base import (
117
EInputEvent,
128
KeybindOption,
139
remove_next_console_line_capture,
1410
)
11+
from unrealsdk.hooks import Block
12+
13+
from console_mod_menu.draw import draw
14+
from console_mod_menu.key_matching import KNOWN_KEYS, suggest_keys
1515

1616
from . import (
1717
AbstractScreen,

screens/mod.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from collections.abc import Iterable, Sequence
22
from dataclasses import dataclass, field
33

4-
from unrealsdk import logging
5-
6-
from console_mod_menu.draw import draw, draw_description
7-
from console_mod_menu.option_formatting import draw_option_header, get_option_value_str
84
from mods_base import (
95
JSON,
106
BaseOption,
@@ -20,6 +16,10 @@
2016
SpinnerOption,
2117
ValueOption,
2218
)
19+
from unrealsdk import logging
20+
21+
from console_mod_menu.draw import draw, draw_description
22+
from console_mod_menu.option_formatting import draw_option_header, get_option_value_str
2323

2424
from . import (
2525
AbstractScreen,

screens/option.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
from abc import abstractmethod
44
from dataclasses import dataclass, field
55

6-
from console_mod_menu.draw import draw
7-
from console_mod_menu.option_formatting import draw_option_header
86
from mods_base import (
97
JSON,
108
BaseOption,
@@ -17,6 +15,9 @@
1715
ValueOption,
1816
)
1917

18+
from console_mod_menu.draw import draw
19+
from console_mod_menu.option_formatting import draw_option_header
20+
2021
from . import AbstractScreen, draw_standard_commands, handle_standard_command_input
2122

2223

0 commit comments

Comments
 (0)