forked from PolyArch/humanize
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (57 loc) · 2.1 KB
/
template-test.yml
File metadata and controls
65 lines (57 loc) · 2.1 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
name: Template Loader Tests
on:
push:
branches: ['**']
paths:
- 'prompt-template/**'
- 'hooks/**'
- 'tests/**'
- '.github/workflows/template-test.yml'
pull_request:
branches: ['**']
paths:
- 'prompt-template/**'
- 'hooks/**'
- 'tests/**'
- '.github/workflows/template-test.yml'
jobs:
template-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run template loader unit tests
run: |
echo "========================================"
echo "Running template loader unit tests"
echo "========================================"
chmod +x tests/test-template-loader.sh
./tests/test-template-loader.sh
- name: Run comprehensive template validation
run: |
echo "========================================"
echo "Running comprehensive template validation"
echo "========================================"
chmod +x tests/test-templates-comprehensive.sh
./tests/test-templates-comprehensive.sh
- name: Verify template references exist
run: |
echo "========================================"
echo "Verifying all template references exist"
echo "========================================"
chmod +x tests/test-template-references.sh
./tests/test-template-references.sh
- name: Verify all hook scripts still work
run: |
echo "========================================"
echo "Verifying hook scripts can source templates"
echo "========================================"
# Test that all hook scripts can source the template loader
for script in hooks/loop-*.sh; do
echo "Testing: $script"
# Just source the script in a subshell to verify no errors
# We can't actually run them without the proper environment
bash -n "$script" && echo " Syntax: OK"
done
echo ""
echo "All hook scripts are valid"