-
-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (33 loc) · 988 Bytes
/
ci.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: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get yarn cache dir
id: yarnCache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-yarn
with:
path: ${{ steps.yarnCache.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('backend/yarn.lock') }}
- name: Install dependencies
run: yarn workspace backend install
- name: Test and build
run: |
yarn workspace backend lint
yarn workspace backend test
yarn workspace backend build