Skip to content

update the workflow to verify the lock file exists #3

update the workflow to verify the lock file exists

update the workflow to verify the lock file exists #3

name: Lint with JSHint
on:
push:
branches:
- 'main' # The main branch for production-ready code
- 'dev' # The development branch for ongoing feature work
- 'tests' # A branch dedicated to testing purposes
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
# Specify the subdirectory path where the repository should be checked out
path: node-express-server
- name: Set up Node.js and Yarn
uses: actions/setup-node@v3
with:
# Using Node.js version 20 for compatibility with the project dependencies and JSHint.
node-version: '20'
# Caches dependencies for Yarn to speed up workflow execution
cache: 'yarn'
- name: Install dependencies
run: yarn install
working-directory: node-express-server
- name: Run JSHint
run: npx jshint webserver.js --show-non-errors
working-directory: node-express-server