From 9a6bdf64451f87e565e7588ba8113b3fdb1e9020 Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Thu, 14 Nov 2024 10:45:45 -0700 Subject: [PATCH] add lint --- .github/workflows/lint.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..95a38fa --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +name: Lint + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + name: ${{ matrix.lint-target }} + strategy: + matrix: + lint-target: ["c++", "typescript"] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install dependencies + shell: bash + run: npm i --ignore-scripts + + - if: matrix.lint-target == 'c++' + shell: bash + run: | + npm run check:clang-format + - if: matrix.lint-target == 'typescript' + shell: bash + run: | + npm run check:eslint \ No newline at end of file