From 3bf9e000cb2e0940a1e2e377f8142d63c13c9b53 Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Sun, 15 Sep 2024 20:24:46 -0700 Subject: [PATCH] Added CI to enforce linting and type checking. (#263) * Added CI to enforce linting and type checking. * Update type check * Change job name * Check diagnostics * Add ags * Update install script for ags * update * Fix sudo misspell * Add which * Added ags types repo as a submodule * Update ci * Update ci * tsconfig update * add types * ci update * Remove types directory initially * remove temp types * Testing ci checks with a type error. * Revert type error --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ .gitmodules | 3 +++ external/ags-types | 1 + 3 files changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .gitmodules create mode 160000 external/ags-types diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..27ec51a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + pull_request: + branches: + - master + +jobs: + code_quality: + runs-on: ubuntu-latest + + steps: + - name: Checkout main repository + uses: actions/checkout@v3 + + - name: Clone ags-types to temp dir + uses: actions/checkout@v3 + with: + repository: Jas-SinghFSU/ags-types + path: temp-ags-types + + - name: Copy types to types/ + run: | + rm -rf types + mkdir -p types + cp -R temp-ags-types/types/* types/ + rm -rf temp-ags-types + + - name: Node Setup + uses: actions/setup-node@v3 + with: + node-version: '21' + + - name: Install Dependencies + run: npm install + + - name: ESLint + run: npm run lint + + - name: Type Check + run: npx tsc --noEmit --pretty --extendedDiagnostics diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b165aa5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "external/ags-types"] + path = external/ags-types + url = https://github.com/Jas-SinghFSU/ags-types.git diff --git a/external/ags-types b/external/ags-types new file mode 160000 index 0000000..87b5046 --- /dev/null +++ b/external/ags-types @@ -0,0 +1 @@ +Subproject commit 87b5046791040615cd65b48a04be062662a46e36