Skip to content

Commit 2629996

Browse files
committed
chore: add test workflow
1 parent 85d6382 commit 2629996

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: 🧪 Test
2+
run-name: 🧪 Test (${{ github.ref_name }})
3+
4+
on:
5+
push:
6+
branches:
7+
- develop*
8+
paths:
9+
- '**/*.ts'
10+
- '**/*.json'
11+
pull_request:
12+
branches:
13+
- develop*
14+
paths:
15+
- '**/*.ts'
16+
- '**/*.json'
17+
18+
jobs:
19+
test:
20+
name: 🧪 Test (${{ github.ref_name }})
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: 🚚 Checkout (${{ github.ref_name }})
24+
uses: actions/checkout@v5
25+
26+
- name: 📥 Install dependencies
27+
run: npm ci
28+
29+
- name: 🔨 Build extension
30+
run: npm run build
31+
32+
- name: ✅ Validate build output
33+
run: |
34+
# Check if dist directory exists
35+
if [ ! -d "dist" ]; then
36+
echo "❌ dist directory not found" | tee -a $GITHUB_STEP_SUMMARY
37+
exit 1
38+
fi
39+
40+
# Check if manifest.json exists
41+
if [ ! -f "dist/manifest.json" ]; then
42+
echo "❌ dist/manifest.json not found" | tee -a $GITHUB_STEP_SUMMARY
43+
exit 1
44+
fi
45+
46+
# Check if content.js exists
47+
if [ ! -f "dist/content.js" ]; then
48+
echo "❌ dist/content.js not found" | tee -a $GITHUB_STEP_SUMMARY
49+
exit 1
50+
fi
51+
52+
# Check if background.js exists
53+
if [ ! -f "dist/background.js" ]; then
54+
echo "❌ dist/background.js not found" | tee -a $GITHUB_STEP_SUMMARY
55+
exit 1
56+
fi
57+
58+
echo "✅ Build validation passed" | tee -a $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)