From e7f9b518faa5674875629dd6187b98f0da2e805b Mon Sep 17 00:00:00 2001 From: apple1417 Date: Thu, 10 Oct 2024 22:45:13 +1300 Subject: [PATCH] try add ci --- .github/workflows/ci.yml | 64 ++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 ++ 2 files changed, 66 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..97e6b67 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,64 @@ +name: CI + +on: [push, pull_request] + +jobs: + spelling: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Check spelling + uses: crate-ci/typos@master + + pyright: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + path: console_mod_menu + + - name: Checkout stubs + uses: actions/checkout@v4 + with: + repository: bl-sdk/pyunrealsdk + path: pyunrealsdk + sparse-checkout: | + stubs + + - name: Checkout mods_base + uses: actions/checkout@v4 + with: + repository: bl-sdk/mods_base + path: mods_base + + - name: Add stubs to pyproject + run: > + sed + 's/# CI ADD STUB PATH HERE/stubPath = "pyunrealsdk\/stubs"\nreportMissingModuleSource = false/' + console_mod_menu/pyproject.toml + > pyproject.toml + + - name: Run pyright + uses: jakebailey/pyright-action@v2 + with: + working-directory: "./console_mod_menu/" + + ruff: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Run Ruff Linting + uses: chartboost/ruff-action@v1 + + - name: Run Ruff Formatting + uses: chartboost/ruff-action@v1 + with: + args: format --check diff --git a/pyproject.toml b/pyproject.toml index 137955a..4ebc61f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,8 @@ pythonVersion = "3.13" typeCheckingMode = "strict" pythonPlatform = "Windows" +# CI ADD STUB PATH HERE + [tool.ruff] target-version = "py313" line-length = 100