Skip to content

W/feat/test habits log #118

W/feat/test habits log

W/feat/test habits log #118

Workflow file for this run

name: Continuous Integration
on:
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '21.6.1'
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# Install dependencies and run lint in the server directory
- name: Install server dependencies
run: |
cd server
npm ci
- name: Run server lint
run: |
cd server
npm run lint
- name: Run server Jest tests
run: |
cd server
npm test
# Install dependencies, run lint, and tests in the client directory
- name: Install client dependencies
run: |
cd client
npm install
- name: Run client lint
run: |
cd client
npm run lint-fix
- name: Run client Jest tests
run: |
cd client
npm test