@@ -120,11 +120,60 @@ jobs:
120120 name : build-artifacts
121121 path : dist/
122122
123+ runtime-compatibility :
124+ name : Runtime Compatibility
125+ runs-on : ubuntu-latest
126+ needs : [build]
127+
128+ steps :
129+ - name : Checkout code
130+ uses : actions/checkout@v5
131+
132+ - name : Setup Node.js
133+ uses : actions/setup-node@v4
134+ with :
135+ node-version : 20
136+ cache : ' npm'
137+
138+ - name : Install dependencies
139+ run : npm ci
140+
141+ - name : Build the library
142+ run : npm run build
143+
144+ - name : Setup Deno
145+ uses : denoland/setup-deno@v2
146+ with :
147+ deno-version : v2.x
148+
149+ - name : Test with Deno
150+ run : deno run --allow-read tests/runtime-tests/deno-test.ts
151+
152+ - name : Setup Bun
153+ uses : oven-sh/setup-bun@v2
154+ with :
155+ bun-version : latest
156+
157+ - name : Test with Bun
158+ run : bun tests/runtime-tests/bun-test.ts
159+
160+ - name : Test CLI with Deno
161+ run : |
162+ echo "Testing CLI with Deno..."
163+ deno run --allow-read bin/nano-string.js slugify "Hello Deno World"
164+ echo "hello-world" | deno run --allow-read bin/nano-string.js kebabCase
165+
166+ - name : Test CLI with Bun
167+ run : |
168+ echo "Testing CLI with Bun..."
169+ bun bin/nano-string.js camelCase "hello-bun-world"
170+ echo "bun-test" | bun bin/nano-string.js constantCase
171+
123172 validate :
124173 name : Validate Package
125174 runs-on : ubuntu-latest
126175 needs : [build]
127-
176+
128177 steps :
129178 - name : Checkout code
130179 uses : actions/checkout@v5
@@ -154,21 +203,23 @@ jobs:
154203 ci-success :
155204 name : CI Success
156205 runs-on : ubuntu-latest
157- needs : [typecheck, test, build, validate]
206+ needs : [typecheck, test, build, validate, runtime-compatibility ]
158207 if : always()
159-
208+
160209 steps :
161210 - name : Check all jobs status
162211 run : |
163212 if [[ "${{ needs.typecheck.result }}" != "success" || \
164213 "${{ needs.test.result }}" != "success" || \
165214 "${{ needs.build.result }}" != "success" || \
166- "${{ needs.validate.result }}" != "success" ]]; then
215+ "${{ needs.validate.result }}" != "success" || \
216+ "${{ needs.runtime-compatibility.result }}" != "success" ]]; then
167217 echo "❌ One or more CI checks failed"
168218 echo "TypeCheck: ${{ needs.typecheck.result }}"
169219 echo "Test: ${{ needs.test.result }}"
170220 echo "Build: ${{ needs.build.result }}"
171221 echo "Validate: ${{ needs.validate.result }}"
222+ echo "Runtime Compatibility: ${{ needs.runtime-compatibility.result }}"
172223 exit 1
173224 fi
174225 echo "✅ All CI checks passed successfully!"
0 commit comments