Skip to content

#36 - Ranking

#36 - Ranking #352

name: Test & lint JS codebase
on:
pull_request:
branches: [ "main" ]
types: [opened, synchronize, reopened, ready_for_review]
paths:
- '**.js'
- '**.ts'
- '**.vue'
- 'package.json'
- 'package.lock'
jobs:
test-and-lint-js:
name: Test & lint JS codebase
timeout-minutes: 10
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 # https://github.com/actions/checkout
- name: Cache dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 # https://github.com/actions/cache
with:
path: node_modules
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package.lock') }}
restore-keys: ${{ runner.os }}-npm-dependencies
- name: Set up node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 # https://github.com/actions/setup-node
with:
node-version: 21
- name: Instal npm dependencies
run: npm clean-install
- name: Run JS linter
run: npm run lint