Skip to content

Commit

Permalink
🔧 chore[workflow]: update GitHub workflow fix invalid path
Browse files Browse the repository at this point in the history
  • Loading branch information
boytur committed Aug 19, 2024
1 parent 96ed9d6 commit 1119663
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
Expand All @@ -18,20 +15,35 @@ jobs:
node-version: [22.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
working-directory: milkyway-bot/report-server
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Print current directory and list files
run: |
echo "Current directory:"
pwd
echo "Listing files in the repository:"
ls -la
- name: Install dependencies
run: |
npm install actions/setup-node@v4
actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
if [ -f milkyway-bot/report-server/package-lock.json ]; then
npm ci
else
npm install
fi
working-directory: milkyway-bot/report-server

- run: npm run build --if-present
- name: Build the project
run: npm run build --if-present
working-directory: milkyway-bot/report-server

- run: npm test
- name: Run tests
run: npm test
working-directory: milkyway-bot/report-server

0 comments on commit 1119663

Please sign in to comment.