github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/.github/workflows/lint-js.yml (about) 1 name: JS Lint 2 3 on: 4 push: 5 branches: [main] 6 pull_request: 7 branches: [main] 8 9 jobs: 10 js-lint: 11 runs-on: ubuntu-latest 12 steps: 13 - name: Checkout 14 uses: actions/checkout@v2 15 - uses: actions/setup-node@v2 16 with: 17 node-version: '16.18' 18 - name: Get yarn cache directory path 19 id: yarn-cache-dir-path 20 run: echo "::set-output name=dir::$(yarn cache dir)" 21 22 - uses: actions/cache@v2 23 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) 24 with: 25 path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 26 key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} 27 restore-keys: | 28 ${{ runner.os }}-yarn 29 30 - name: Install Webapp dependencies 31 run: yarn install --frozen-lockfile 32 - run: yarn build 33 - name: Run Format check 34 run: yarn format:check 35 - name: Run Lint 36 # Use use --quiet so that it only report errors 37 run: yarn lint:quiet 38 39 - name: Run Type check 40 run: yarn type-check