Skip to content

Commit 9cd5702

Browse files
committed
chore(cicd): add and update workflows
1 parent cf5035c commit 9cd5702

File tree

4 files changed

+72
-2
lines changed

4 files changed

+72
-2
lines changed

.github/workflows/audit.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 🔒 Audit Dependencies
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * 1' # every Monday at 03:00 UTC
6+
workflow_dispatch: # allow manual run
7+
8+
jobs:
9+
audit:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: ⬇️ Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: 🟢 Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: 'npm'
21+
22+
- name: 📦 Install dependencies
23+
run: npm ci
24+
25+
- name: 🔍 Run npm audit
26+
run: |
27+
npm audit --audit-level=high || echo "Audit completed with vulnerabilities"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 🧪 Test Coverage
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
coverage:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: ⬇️ Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: 🟢 Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: 'npm'
21+
22+
- name: 📦 Install dependencies
23+
run: npm ci
24+
25+
- name: 🧪 Run tests with coverage
26+
run: npm run test:coverage
27+
28+
- name: 📤 Upload coverage to Codecov
29+
uses: codecov/codecov-action@v5
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }}
32+
files: reports/coverage/lcov.info
33+
flags: unittests
34+
name: codecov-coverage-report

.github/workflows/node-build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: 🟢 Setup Node.js
1818
uses: actions/setup-node@v3
1919
with:
20-
node-version: '22'
20+
node-version: 22
2121

2222
- name: 📦 Install dependencies
2323
run: npm ci
@@ -28,6 +28,9 @@ jobs:
2828
- name: 🔡 Type check
2929
run: npx tsc --noEmit
3030

31+
- name: 🧪 Run tests
32+
run: npm run test
33+
3134
- name: 🏗️ Build project
3235
run: npm run compile
3336

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: 🟢 Setup Node.js
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: '22'
21+
node-version: 22
2222
registry-url: 'https://registry.npmjs.org'
2323

2424
- name: 📦 Install dependencies
@@ -27,6 +27,12 @@ jobs:
2727
- name: 🧪 Run lint
2828
run: npm run lint
2929

30+
- name: 🔡 Type check
31+
run: npx tsc --noEmit
32+
33+
- name: 🧪 Run tests
34+
run: npm run test
35+
3036
- name: 🛠️ Build package
3137
run: npm run compile
3238

0 commit comments

Comments
 (0)