diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..a0695e2 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,46 @@ +name: Lint + +on: + # Trigger the workflow on push or pull request, + # but only for the dev branch + push: + branches: + - dev + pull_request: + branches: + - dev + +jobs: + run-linters: + name: Run linters + runs-on: ubuntu-latest + continue-on-error: false + + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - name: Cache node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + ${{ runner.os }}-node- + + - name: Install Node.js dependencies + run: npm ci + + - name: Verify Node.js version + run: node -v + + - name: Run Lint and Type Check + run: npm run lint +