Skip to content

Commit adf28ce

Browse files
committed
Migrate CI workflow to use centralized reusable workflow
Simplify CI configuration by leveraging the new reusable ci.yml workflow from socket-registry. This provides consistent CI orchestration across all Socket projects with parallel execution of lint, type-check, test, and coverage jobs.
1 parent 797ec8f commit adf28ce

File tree

1 file changed

+12
-70
lines changed

1 file changed

+12
-70
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🚀 CI Pipeline
22

3-
# Comprehensive CI pipeline that runs all quality checks and tests.
4-
# Orchestrates lint, type checking, and testing workflows in parallel.
3+
# Dependencies:
4+
# - SocketDev/socket-registry/.github/workflows/ci.yml
55

66
on:
77
push:
@@ -19,76 +19,18 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
jobs:
22-
lint:
23-
name: 🧹 Lint Check
24-
uses: SocketDev/socket-registry/.github/workflows/lint.yml@main
22+
ci:
23+
name: Run CI Pipeline
24+
uses: SocketDev/socket-registry/.github/workflows/ci.yml@main
2525
with:
26+
coverage-script: 'pnpm run test:unit:coverage'
27+
coverage-report-script: 'pnpm run coverage:percent --json'
28+
fail-fast: false
2629
lint-script: 'pnpm run check-ci'
27-
node-version: '22'
28-
timeout-minutes: 10
29-
30-
type-check:
31-
name: 🔍 Type Check
32-
uses: SocketDev/socket-registry/.github/workflows/types.yml@main
33-
with:
34-
type-script: 'pnpm run check:tsc'
35-
setup-script: 'pnpm run build'
36-
node-version: '22'
37-
timeout-minutes: 10
38-
39-
test:
40-
name: 🧪 Test Matrix
41-
uses: SocketDev/socket-registry/.github/workflows/test.yml@main
42-
with:
4330
node-versions: '[20, 22, 24]'
4431
os-versions: '["ubuntu-latest", "windows-latest"]'
45-
setup-script: 'pnpm run build'
4632
test-script: 'pnpm run test-ci'
47-
timeout-minutes: 15
48-
fail-fast: false
49-
max-parallel: 4
50-
51-
test-coverage:
52-
name: 📊 Coverage Report
53-
runs-on: ubuntu-latest
54-
timeout-minutes: 15
55-
steps:
56-
- uses: actions/checkout@v4
57-
58-
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@main
59-
with:
60-
node-version: '22'
61-
62-
- name: Build project
63-
run: pnpm run build
64-
65-
- name: Run tests with coverage
66-
run: pnpm run test:unit:coverage
67-
68-
- name: Generate coverage report
69-
run: pnpm run coverage:percent --json
70-
71-
- name: Upload coverage artifacts
72-
uses: actions/upload-artifact@v4
73-
with:
74-
name: coverage-report
75-
path: coverage/
76-
retention-days: 7
77-
78-
ci-summary:
79-
name: ✅ CI Summary
80-
runs-on: ubuntu-latest
81-
needs: [lint, type-check, test, test-coverage]
82-
if: always()
83-
steps:
84-
- name: Check all jobs passed
85-
run: |
86-
if [ "${{ needs.lint.result }}" != "success" ] || \
87-
[ "${{ needs.type-check.result }}" != "success" ] || \
88-
[ "${{ needs.test.result }}" != "success" ] || \
89-
[ "${{ needs.test-coverage.result }}" != "success" ]; then
90-
echo "❌ CI Pipeline Failed"
91-
exit 1
92-
else
93-
echo "✅ CI Pipeline Passed"
94-
fi
33+
test-setup-script: 'pnpm run build'
34+
test-timeout-minutes: 15
35+
type-check-script: 'pnpm run check:tsc'
36+
type-check-setup-script: 'pnpm run build'

0 commit comments

Comments
 (0)