Skip to content

Commit ebeb6e2

Browse files
committed
update path for tests and linting
1 parent 7c72ea5 commit ebeb6e2

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/lint-with-jshint.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ jobs:
1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v3
16-
# No additional parameters are needed as this step simply checks out the repository
16+
with:
17+
# Specify the subdirectory path where the repository should be checked out
18+
path: node-express-server
1719

1820
- name: Set up Node.js and Yarn
1921
uses: actions/setup-node@v3
@@ -25,6 +27,8 @@ jobs:
2527

2628
- name: Install dependencies
2729
run: yarn install
30+
working-directory: node-express-server
2831

2932
- name: Run JSHint
3033
run: npx jshint webserver.js --show-non-errors
34+
working-directory: node-express-server

.github/workflows/run-mocha-tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,22 @@ jobs:
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v3
18+
with:
19+
# Specify the subdirectory path where the repository should be checked out
20+
path: node-express-server
1821

1922
- name: Set up Node.js
2023
uses: actions/setup-node@v3
2124
with:
25+
# Using Node.js version 20 for compatibility with the project dependencies and JSHint.
2226
node-version: '20'
27+
# Caches dependencies for Yarn to speed up workflow execution
28+
cache: 'yarn'
2329

2430
- name: Install dependencies
25-
run: npm install
31+
run: yarn install
32+
working-directory: node-express-server
2633

2734
- name: Run Mocha tests
28-
run: npx mocha test/webserver.test.js
35+
run: npx mocha test/webserver.test.js
36+
working-directory: node-express-server

0 commit comments

Comments
 (0)