Skip to content

checkout code + run app in runner #1

checkout code + run app in runner

checkout code + run app in runner #1

name: Checkout and run nodejs app inside runner(VM)
on:
push:
branches:
- job-in-container
jobs:
build:
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: Install dependencies
working-directory: ./nodejs-docker
run: npm ci
- name: Run server
working-directory: ./nodejs-docker
run: |
npm start
- name: Get users
run: curl http://localhost:3000/users