-
Notifications
You must be signed in to change notification settings - Fork 37
31 lines (29 loc) · 886 Bytes
/
node.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
name: 'Node'
on:
push:
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: 'Checkout 🛬'
uses: actions/checkout@v4
- name: 'Cache dependencies 📦'
id: cache-node_modules
uses: actions/cache@v4
with:
path: 'node_modules'
key: ${{ runner.os }}-node_module-${{ hashFiles('package*.json') }}-${{ hashFiles('.github/workflows/node.yml') }}
- name: 'Setup node ⚙️'
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: npm
- name: 'Install dependencies 📥'
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
- name: 'Build typescript 📦'
run: npm run build && find dist/main.js
- name: 'Lint code 💅🏻'
run: npm run lint
- name: 'Run test ✅'
run: npm run test