-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.08 KB
/
codebase-check.yml
File metadata and controls
44 lines (35 loc) · 1.08 KB
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
# reference: https://github.com/acmcsufoss/fullyhacks/blob/main/.github/workflows/website-check.yaml
name: Codebase Check
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check-formatting:
name: Check formatting with Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
- name: Cache dependencies
uses: actions/cache@v3
id: npm-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ github.event.pull_request.number }}-
- name: Install dependencies
# if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci
- name: List installed dependencies
run: npm ls --depth=0
- name: Check formatting with Prettier
# run: npx prettier --check .
run: npm run check