correct action name #7
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 container and let job interact with app | |
# job running inside container | |
name: Checkout and run nodejs app inside container | |
on: push | |
defaults: | |
run: | |
working-directory: ./nodejs-docker | |
jobs: | |
build: | |
env: | |
MONGO_HOSTNAME: ${{ secrets.MONGO_HOSTNAME }} | |
MONGO_USERNAME: ${{ secrets.MONGO_USERNAME }} | |
MONGO_PWD: ${{ secrets.MONGO_PWD }} | |
runs-on: ubuntu-latest | |
container: | |
image: node:18 | |
steps: | |
- name: Get Code | |
uses: actions/checkout@v4 | |
- name: Folder content | |
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 | |
run: npm ci | |
- name: Run server | |
run: | | |
npm start & npx wait-on http://localhost:3000 | |
- name: Get users | |
run: curl http://localhost:3000/users |