Skip to content

Update package.json #126

Update package.json

Update package.json #126

Workflow file for this run

name: CI workflow for both todo and auth API
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
services:
mongodb:
image: mongo
ports:
- 27017:27017
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js latest
uses: actions/setup-node@v2-beta
with:
node-version: "*"
- name: Prepare environnement by install babel before building
working-directory: ${{ github.workspace }}/todo-api
run: |
npm install babel-cli@latest -g
babel --version
# Jobs for todo-api
- name: check that every files were checked out
working-directory: ${{ github.workspace }}
run: |
cd todo-api
ls -la
cd ..
cd auth-api
ls -la
- name: Install dependencies
working-directory: ${{ github.workspace }}
run: |
cd todo-api
npm install
cd ..
cd auth-api
npm install
- name: Build auth-api with babel support
working-directory: ${{ github.workspace }}/auth-api
env:
DB: mongodb://localhost/user-DB
PORT: 4268
NODE_ENV: Test
SECRET: Bidon
run: npm run build:ts && npm test
#- name: Build todo-api with babel support
# working-directory: ${{ github.workspace }}/todo-api
#env:
# DB: mongodb://localhost/todo-DB
#PORT: 4267
#NODE_ENV: Test
#SECRET: Bidon
#run: npm run dist
#- name: perform todo-api API sanity check
# working-directory: ${{ github.workspace }}/todo-api
#env:
#DB: mongodb://localhost/todo-DB
#NODE_ENV: test
#PORT: 4267
#SECRET: Bidon
#run: npm run check
# - name: perform auth-api API sanity check
# working-directory: ${{ github.workspace }}/auth-api
# env:
# DB: mongodb://localhost/user-DB
#PORT: 4268
#SECRET: Bidon
#run: npm run check
#source: https://github.community/t5/GitHub-Actions/Github-actions-working-directory-incorrectly-documented/td-p/29201