From 8d27557376e45f604e856b4a9bb452a769918753 Mon Sep 17 00:00:00 2001 From: Serban Andrei Stancu Date: Wed, 17 Jul 2024 14:27:50 -0600 Subject: [PATCH] Run linting on PR. (#1144) --- .github/workflows/dev.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index c544b2b18..404cb43a1 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -11,6 +11,26 @@ env: ALLOY_ENV: int jobs: + linting: + name: "Linting files" + runs-on: ubuntu-latest + steps: + - name: Set up Node.js version + uses: actions/setup-node@v4 + with: + node-version: 22 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + id: npm-cache + with: + path: "**/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }} # increment NPM_CACHE_VERSION secret to force cache reset + - name: Install dependencies + if: steps.npm-cache.outputs.cache-hit != 'true' + run: npm ci + - name: Linting + run: npm run lint + unit-test: name: "Unit Test" runs-on: ubuntu-latest