forked from openai/retro
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 1.56 KB
/
nodejs.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
################################################################################
#
# Copyright (C) 2023-2024 retro.ai
# This file is part of retro3 - https://github.com/retroai/retro3
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# See the file LICENSE for more information.
#
################################################################################
name: Node.js CI
on: [push, pull_request]
jobs:
build-and-deploy:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
defaults:
run:
# Set the working directory to frontend folder
working-directory: src/frontend
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
node-version: 20
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: |
npm install -g pnpm
- name: Cache pnpm modules
id: cache-modules
uses: actions/cache@v4
with:
path: |
src/frontend/node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-pnpm-${{ hashFiles('src/frontend/pnpm-lock.yaml') }}
- name: pnpm install
if: steps.cache-modules.outputs.cache-hit != 'true'
run: |
pnpm install
- name: pnpm audit-ci
run: |
pnpm audit-ci
- name: pnpm lint
run: |
pnpm lint
- name: pnpm build
run: |
pnpm build