forked from icarda-git/AReS
-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (33 loc) · 1.1 KB
/
backend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Name that shows up in the badge
name: Backend
# Trigger workflow on pushes and pull requests to all branches
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
# This job is to test whether npm dependencies are installable, so we use
# `npm install`, which also installs devDependencies.
name: Build
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: backend/package-lock.json
- run: npm install -g npm@9; cd backend; npm install
format:
runs-on: ubuntu-22.04
# This job is to check the formatting with prettier, so we install exact
# dependencies from package-lock.json with `npm ci`.
name: Prettier format check
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: backend/package-lock.json
- run: npm install -g npm@9; cd backend; npm ci; npm run format:check