-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (56 loc) · 1.81 KB
/
test-scripts.yml
File metadata and controls
66 lines (56 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Automated Script Testing
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
workflow_dispatch:
# Allow manual trigger
jobs:
test-scripts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Make test runner executable
run: chmod +x tests/test-runner.sh
- name: Make all scripts executable
run: |
chmod +x scripts/*.sh
chmod +x tests/*.sh
- name: Run script tests
run: ./tests/test-runner.sh
- name: Verify script functionality
run: |
echo "🔍 Verifying script functionality..."
./scripts/manage-versions.sh show
./scripts/extract-version.sh template
./scripts/check-template-version.sh
- name: Test version consistency
run: |
echo "🔍 Testing version consistency..."
if ! ./scripts/manage-versions.sh check; then
echo "❌ Version inconsistency detected!"
exit 1
else
echo "✅ All versions are consistent"
fi
# Optional: Create artifact with test results
- name: Create test report
if: always()
run: |
echo "# Test Report - $(date)" > test-report.md
echo "" >> test-report.md
echo "## Script Status" >> test-report.md
echo "" >> test-report.md
./scripts/manage-versions.sh show >> test-report.md 2>&1 || true
echo "" >> test-report.md
echo "## Version Check" >> test-report.md
echo "" >> test-report.md
./scripts/manage-versions.sh check >> test-report.md 2>&1 || true
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: script-test-report
path: test-report.md