update workflow spec again #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |