-
Notifications
You must be signed in to change notification settings - Fork 5
231 lines (205 loc) · 7.77 KB
/
test-action.yml
File metadata and controls
231 lines (205 loc) · 7.77 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
name: Test All Action Capabilities
on: [push]
jobs:
test-action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout LiaScript docs
uses: actions/checkout@v4
with:
repository: LiaScript/docs
path: docs
# Test SCORM 1.2 with all settings
- name: Export to SCORM 1.2 (Full Settings)
id: export-scorm12
uses: ./
with:
input-file: 'docs/README.md'
format: 'scorm1.2'
output-name: 'test-scorm12-full'
scorm-organization: 'Test Organization'
scorm-mastery-score: '85'
scorm-typical-duration: 'PT1H30M0S'
scorm-iframe: true
scorm-embed: true
scorm-always-active: true
# Test SCORM 2004
- name: Export to SCORM 2004
id: export-scorm2004
uses: ./
with:
input-file: 'docs/README.md'
format: 'scorm2004'
output-name: 'test-scorm2004'
scorm-organization: 'Test Organization'
scorm-mastery-score: '75'
# Test PDF with custom settings
- name: Export to PDF (Custom Settings)
id: export-pdf
uses: ./
with:
input-file: 'docs/README.md'
format: 'pdf'
output-name: 'test-pdf-custom'
pdf-theme: 'blue'
pdf-format: 'A4'
pdf-scale: '1.2'
pdf-landscape: true
pdf-print-background: true
# Test Web export with all settings
- name: Export to Web
id: export-web
uses: ./
with:
input-file: 'docs/README.md'
format: 'web'
output-name: 'test-web'
web-zip: true
web-indexeddb: true
web-iframe: true
# Test IMS package
- name: Export to IMS
id: export-ims
uses: ./
with:
input-file: 'docs/README.md'
format: 'ims'
output-name: 'test-ims'
ims-indexeddb: true
# Test xAPI package
- name: Export to xAPI
id: export-xapi
uses: ./
with:
input-file: 'docs/README.md'
format: 'xapi'
output-name: 'test-xapi'
xapi-course-id: 'test-course-123'
xapi-course-title: 'Test Course Title'
xapi-debug: true
xapi-zip: true
# Test RDF export
- name: Export to RDF (JSON-LD)
id: export-rdf-jsonld
uses: ./
with:
input-file: 'docs/README.md'
format: 'rdf'
output-name: 'test-rdf-jsonld'
rdf-format: 'json-ld'
rdf-type: 'Course'
rdf-educational-level: 'intermediate'
# Test RDF export (N-Quads)
- name: Export to RDF (N-Quads)
id: export-rdf-nquads
uses: ./
with:
input-file: 'docs/README.md'
format: 'rdf'
output-name: 'test-rdf-nquads'
rdf-format: 'n-quads'
rdf-type: 'EducationalResource'
# Test JSON export
- name: Export to JSON
id: export-json
uses: ./
with:
input-file: 'docs/README.md'
format: 'json'
output-name: 'test-json'
# Test with custom styling
- name: Export with Custom Styling
id: export-styled
uses: ./
with:
input-file: 'docs/README.md'
format: 'scorm1.2'
output-name: 'test-styled'
style: 'body { background-color: #f0f0f0; } .lia-slide { border: 2px solid #333; }'
scorm-organization: 'Styled Test'
# Test with course path override
- name: Export with Course Path Override
id: export-course-path
uses: ./
with:
input-file: 'docs/README.md'
course-path: 'docs'
format: 'scorm1.2'
output-name: 'test-course-path'
scorm-organization: 'Course Path Test'
# Upload all artifacts
- name: Upload SCORM 1.2 Full
uses: actions/upload-artifact@v4
with:
name: test-scorm12-full
path: ${{ steps.export-scorm12.outputs.output-file }}
- name: Upload SCORM 2004
uses: actions/upload-artifact@v4
with:
name: test-scorm2004
path: ${{ steps.export-scorm2004.outputs.output-file }}
- name: Upload PDF Custom
uses: actions/upload-artifact@v4
with:
name: test-pdf-custom
path: ${{ steps.export-pdf.outputs.output-file }}
- name: Upload Web Export
uses: actions/upload-artifact@v4
with:
name: test-web
path: ${{ steps.export-web.outputs.output-file }}
- name: Upload IMS Package
uses: actions/upload-artifact@v4
with:
name: test-ims
path: ${{ steps.export-ims.outputs.output-file }}
- name: Upload xAPI Package
uses: actions/upload-artifact@v4
with:
name: test-xapi
path: ${{ steps.export-xapi.outputs.output-file }}
- name: Upload RDF JSON-LD
uses: actions/upload-artifact@v4
with:
name: test-rdf-jsonld
path: ${{ steps.export-rdf-jsonld.outputs.output-file }}
- name: Upload RDF N-Quads
uses: actions/upload-artifact@v4
with:
name: test-rdf-nquads
path: ${{ steps.export-rdf-nquads.outputs.output-file }}
- name: Upload JSON Export
uses: actions/upload-artifact@v4
with:
name: test-json
path: ${{ steps.export-json.outputs.output-file }}
- name: Upload Styled Export
uses: actions/upload-artifact@v4
with:
name: test-styled
path: ${{ steps.export-styled.outputs.output-file }}
- name: Upload Course Path Test
uses: actions/upload-artifact@v4
with:
name: test-course-path
path: ${{ steps.export-course-path.outputs.output-file }}
# Summary step to display all results
- name: Export Summary
run: |
echo "## Export Results Summary" >> $GITHUB_STEP_SUMMARY
echo "| Format | Output File | File Size | Status |" >> $GITHUB_STEP_SUMMARY
echo "|--------|-------------|-----------|---------|" >> $GITHUB_STEP_SUMMARY
echo "| SCORM 1.2 Full | ${{ steps.export-scorm12.outputs.output-file }} | ${{ steps.export-scorm12.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| SCORM 2004 | ${{ steps.export-scorm2004.outputs.output-file }} | ${{ steps.export-scorm2004.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| PDF Custom | ${{ steps.export-pdf.outputs.output-file }} | ${{ steps.export-pdf.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| Web Export | ${{ steps.export-web.outputs.output-file }} | ${{ steps.export-web.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| IMS Package | ${{ steps.export-ims.outputs.output-file }} | ${{ steps.export-ims.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| xAPI Package | ${{ steps.export-xapi.outputs.output-file }} | ${{ steps.export-xapi.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| RDF JSON-LD | ${{ steps.export-rdf-jsonld.outputs.output-file }} | ${{ steps.export-rdf-jsonld.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| RDF N-Quads | ${{ steps.export-rdf-nquads.outputs.output-file }} | ${{ steps.export-rdf-nquads.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| JSON Export | ${{ steps.export-json.outputs.output-file }} | ${{ steps.export-json.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| Styled Export | ${{ steps.export-styled.outputs.output-file }} | ${{ steps.export-styled.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "| Course Path Test | ${{ steps.export-course-path.outputs.output-file }} | ${{ steps.export-course-path.outputs.file-size }} bytes | ✅ |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Total Tests Completed: 11**" >> $GITHUB_STEP_SUMMARY