Skip to content

Commit e7f9b51

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

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
working-directory: "./console_mod_menu/"
50+
51+
ruff:
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
57+
58+
- name: Run Ruff Linting
59+
uses: chartboost/ruff-action@v1
60+
61+
- name: Run Ruff Formatting
62+
uses: chartboost/ruff-action@v1
63+
with:
64+
args: format --check

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

0 commit comments

Comments
 (0)