update directory #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run node-mongo app inside runner and let job interact with app | |
# job running inside VM | |
name: Checkout and run nodejs app inside runner(VM) | |
on: push | |
jobs: | |
build: | |
env: | |
MONGO_HOSTNAME: ${{ secrets.MONGO_HOSTNAME }} | |
MONGO_USERNAME: ${{ secrets.MONGO_USERNAME }} | |
MONGO_PWD: ${{ secrets.MONGO_PWD }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Code | |
uses: actions/checkout@v4 | |
- name: Folder content | |
working-directory: ./nodejs-docker | |
run: ls | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: deps-node-modules-${{ hashFiles('./nodejs-docker/package-lock.json') }} | |
- name: Install dependencies | |
working-directory: ./nodejs-docker | |
run: npm ci | |
- name: Run server | |
working-directory: ./nodejs-docker | |
run: | | |
npm start & npx wait-on http://localhost:3000 | |
- name: Get users | |
run: curl http://localhost:3000/users |