Skip to content

Commit 65f8c7b

Browse files
committed
update the workflow to verify the lock file exists
in the expected subdirectory.
1 parent ebeb6e2 commit 65f8c7b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,21 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@v3
1818
with:
19-
# Specify the subdirectory path where the repository should be checked out
20-
path: node-express-server
19+
path: node-express-server
2120

2221
- name: Set up Node.js
2322
uses: actions/setup-node@v3
2423
with:
25-
# Using Node.js version 20 for compatibility with the project dependencies and JSHint.
2624
node-version: '20'
27-
# Caches dependencies for Yarn to speed up workflow execution
2825
cache: 'yarn'
2926

27+
- name: Verify `yarn.lock` exists
28+
run: |
29+
if [ ! -f node-express-server/yarn.lock ]; then
30+
echo "Error: yarn.lock file is missing in node-express-server directory"
31+
exit 1
32+
fi
33+
3034
- name: Install dependencies
3135
run: yarn install
3236
working-directory: node-express-server

0 commit comments

Comments
 (0)