Skip to content

Commit 4c52c64

Browse files
committed
chore: update workflows for security and typecheck
1 parent a3ea6ac commit 4c52c64

6 files changed

Lines changed: 3820 additions & 561 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ jobs:
2121
uses: actions/setup-node@v4
2222
with:
2323
node-version: "20"
24+
cache: "npm"
2425

2526
- name: Install dependencies
26-
run: npm install
27+
run: npm ci
2728

2829
- name: Run CI
2930
run: npm run ci

.github/workflows/security.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Security Scan
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
schedule:
9+
# Run weekly on Sunday at midnight
10+
- cron: "0 0 * * 0"
11+
12+
jobs:
13+
security_scan:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "20"
23+
cache: "npm"
24+
25+
- name: Install Dependencies
26+
run: npm ci
27+
28+
- name: Run Security Audit
29+
run: npm audit --audit-level=high
30+
31+
- name: Scan for Secrets
32+
uses: trufflesecurity/trufflehog@main
33+
with:
34+
path: ./
35+
baseRef: ${{ github.event.pull_request.base.ref || github.ref }}
36+
headRef: ${{ github.event.pull_request.head.ref || github.sha }}

.github/workflows/typecheck.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Type Check
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
typecheck:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "20"
20+
cache: "npm"
21+
22+
- name: Install Dependencies
23+
run: npm ci
24+
25+
- name: Run TypeScript Type Check
26+
run: npm run typecheck

0 commit comments

Comments
 (0)