diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..4c4bdd5 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,40 @@ +name: CI Workflow + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8.15.4 + + - name: Setup node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Cache pnpm modules + uses: actions/cache@v3 + with: + path: | + ~/.pnpm-store + **/node_modules + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + + - name: Install dependencies with pnpm + run: pnpm install + + - name: Run lint script + run: pnpm run lint diff --git a/package.json b/package.json index 234a2d7..1874fdc 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,9 @@ "lint": "tsc --noEmit && eslint --ext .ts,.tsx,.js,.jsx src", "format": "prettier --write src" }, + "engines": { + "node": ">=18.0.0" + }, "dependencies": { "@cortex-js/compute-engine": "^0.24.1", "@radix-ui/react-slot": "^1.0.2",