-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 999 Bytes
/
check.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
name: Run HCI code check
on: [push, pull_request]
env:
HCI_ROOT_DIR: "."
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache NPM dependencies (or restore previously cached)
id: npm-cache
uses: actions/cache@v4
with:
path: node_modules # It's important to have a single directory that gets cached.
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install NPM dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm install
- name: Format the front end code
run: npm run fmt
- name: Lint the front end code
run: npm run lint
- name: Type check the front end code
run: tsc
- name: Run front end tests
run: npm run test