100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-web-native.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-web-native.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-web-native.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Add canonical.html v1.0 - The single source of truth for usability standards fb6e650 1 year ago History
tests.yml · 5.3 KB · 175 lines
1name: Semantic Components Tests
2
3on:
4 push:
5 branches: [ main, develop ]
6 pull_request:
7 branches: [ main, develop ]
8 schedule:
9 # Run nightly at 2 AM UTC
10 - cron: '0 2 * * *'
11
12jobs:
13 # Tier 1: FREE tests - Run on every commit
14 fast-tests:
15 runs-on: ubuntu-latest
16 steps:
17 - uses: actions/checkout@v3
18
19 - name: Setup Python
20 uses: actions/setup-python@v4
21 with:
22 python-version: '3.11'
23
24 - name: Install Python dependencies
25 run: |
26 python -m pip install --upgrade pip
27 pip install -r requirements.txt
28 playwright install chromium
29
30 - name: Run structure tests (FREE)
31 run: python3 test_structure.py
32
33 - name: Run integration tests (FREE)
34 run: python3 test_integration.py
35
36 - name: Upload test results
37 if: always()
38 uses: actions/upload-artifact@v3
39 with:
40 name: test-results-fast
41 path: test-results/
42
43 # Tier 2: CHEAP tests - Run on PR
44 comprehensive-tests:
45 runs-on: ubuntu-latest
46 if: github.event_name == 'pull_request' || github.event_name == 'schedule'
47 needs: fast-tests
48 steps:
49 - uses: actions/checkout@v3
50
51 - name: Setup Python
52 uses: actions/setup-python@v4
53 with:
54 python-version: '3.11'
55
56 - name: Install dependencies
57 run: |
58 pip install anthropic
59 pip install -r requirements.txt
60 playwright install chromium
61
62 - name: Run voice tests (~$0.01)
63 env:
64 ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
65 run: python3 test_voice.py
66
67 - name: Run context tests (FREE)
68 run: python3 test_context.py
69
70 - name: Run gesture tests (FREE)
71 run: python3 test_gestures.py
72
73 - name: Run attention tests (FREE)
74 run: python3 test_attention.py
75
76 - name: Run performance tests (FREE)
77 run: python3 test_performance.py
78
79 - name: Upload comprehensive results
80 if: always()
81 uses: actions/upload-artifact@v3
82 with:
83 name: test-results-comprehensive
84 path: test-results/
85
86 # Tier 3: EXPENSIVE tests - Run nightly only
87 visual-tests:
88 runs-on: ubuntu-latest
89 if: github.event_name == 'schedule'
90 needs: fast-tests
91 steps:
92 - uses: actions/checkout@v3
93
94 - name: Setup Node.js
95 uses: actions/setup-node@v3
96 with:
97 node-version: '18'
98
99 - name: Setup Python
100 uses: actions/setup-python@v4
101 with:
102 python-version: '3.11'
103
104 - name: Install dependencies
105 run: |
106 pip install -r requirements.txt
107 playwright install chromium
108
109 - name: Generate documentation
110 run: node generate-docs.js
111
112 - name: Run AI vision tests (~$0.50)
113 env:
114 ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
115 run: python3 test_visual_ai.py
116
117 - name: Upload visual results
118 if: always()
119 uses: actions/upload-artifact@v3
120 with:
121 name: test-results-visual
122 path: |
123 test-results/results-ai.json
124 test-results/accessibility-report-ai.html
125 screenshots/
126
127 # Summary report
128 test-summary:
129 runs-on: ubuntu-latest
130 if: always()
131 needs: [fast-tests, comprehensive-tests, visual-tests]
132 steps:
133 - uses: actions/checkout@v3
134
135 - name: Download all artifacts
136 uses: actions/download-artifact@v3
137
138 - name: Generate summary
139 run: |
140 echo "## 🧪 Test Results Summary" >> $GITHUB_STEP_SUMMARY
141 echo "" >> $GITHUB_STEP_SUMMARY
142 echo "### Tier 1: Fast Tests (FREE)" >> $GITHUB_STEP_SUMMARY
143 if [ -f test-results-fast/results-structure.json ]; then
144 echo "✅ Structure tests completed" >> $GITHUB_STEP_SUMMARY
145 fi
146 if [ -f test-results-fast/results-integration.json ]; then
147 echo "✅ Integration tests completed" >> $GITHUB_STEP_SUMMARY
148 fi
149 echo "" >> $GITHUB_STEP_SUMMARY
150
151 if [ -d test-results-comprehensive ]; then
152 echo "### Tier 2: Comprehensive Tests (~$0.01)" >> $GITHUB_STEP_SUMMARY
153 if [ -f test-results-comprehensive/results-voice.json ]; then
154 echo "✅ Voice command tests completed" >> $GITHUB_STEP_SUMMARY
155 fi
156 if [ -f test-results-comprehensive/results-context.json ]; then
157 echo "✅ Context tests completed (mobile/tablet/desktop)" >> $GITHUB_STEP_SUMMARY
158 fi
159 if [ -f test-results-comprehensive/results-gestures.json ]; then
160 echo "✅ Gesture tests completed" >> $GITHUB_STEP_SUMMARY
161 fi
162 if [ -f test-results-comprehensive/results-attention.json ]; then
163 echo "✅ Attention budget tests completed" >> $GITHUB_STEP_SUMMARY
164 fi
165 if [ -f test-results-comprehensive/results-performance.json ]; then
166 echo "✅ Performance tests completed" >> $GITHUB_STEP_SUMMARY
167 fi
168 echo "" >> $GITHUB_STEP_SUMMARY
169 fi
170
171 if [ -f test-results-visual/results-ai.json ]; then
172 echo "### Tier 3: Visual Tests (~$0.50)" >> $GITHUB_STEP_SUMMARY
173 echo "✅ AI vision tests completed" >> $GITHUB_STEP_SUMMARY
174 echo "" >> $GITHUB_STEP_SUMMARY
175 fi