Skip to content

Commit

Permalink
add mongodb for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
satyamkale27 committed Oct 27, 2024
1 parent ced481d commit 5f76c7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@ jobs:
runs-on: ubuntu-latest
env:
CI: true
MONGO_URL: mongodb://localhost/nasa
strategy:
matrix:
node-version: [16.x, 23.x]
mongodb-version: ["7.0"]

steps:
- uses: actions/checkout@v2
- name: Use Node.js version ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Use mongoDB from github actions
uses: supercharge/[email protected]
with:
mongodb-version: ${{matrix.mongodb-version}}

- run: npm install
- run: npm run build --prefix client
- run: npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"watch": "npm run server & npm run client",
"deploy": "npm run build --prefix client && npm start --prefix server",
"deploy-cluster": "npm run build --prefix client && npm run cluster --prefix server",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "npm test --prefix server && npm test --prefix client"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit 5f76c7d

Please sign in to comment.