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 7ee1093
Showing 1 changed file with 31 additions and 19 deletions.
50 changes: 31 additions & 19 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: |
npm install actions/setup-node@v4
actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
working-directory: milkyway-bot/report-server

- run: npm run build --if-present
working-directory: milkyway-bot/report-server

- run: npm test
working-directory: milkyway-bot/report-server
echo "Current directory:"
pwd
echo "Listing files in the repository:"
ls -la
- name: Install dependencies
run: |
if [ -f ./report-server/package-lock.json ]; then
npm ci
else
npm install
fi
working-directory: ./report-server

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

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

0 comments on commit 7ee1093

Please sign in to comment.