-
Notifications
You must be signed in to change notification settings - Fork 1
177 lines (161 loc) · 6.2 KB
/
Copy pathdeploy_reports.yml
File metadata and controls
177 lines (161 loc) · 6.2 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
name: Deploy Reports to GitHub Pages
on:
workflow_run:
workflows: ["Build Samples", "Build Projects"]
types:
- completed
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Samples Artifacts
uses: dawidd6/action-download-artifact@v6
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: build_samples.yml
name: twister-reports-samples
path: reports/samples
if_no_artifact_found: warn
- name: Download Projects Artifacts
uses: dawidd6/action-download-artifact@v6
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: build.yml
name: twister-reports-projects
path: reports/projects
if_no_artifact_found: warn
- name: Create Index Page
run: |
mkdir -p reports
cat > reports/index.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FSW Test Reports</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: #f5f5f5;
}
h1 {
color: #333;
border-bottom: 3px solid #0066cc;
padding-bottom: 10px;
}
.report-section {
background: white;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.report-section h2 {
color: #0066cc;
margin-top: 0;
}
.report-links {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 15px;
}
.report-link {
display: inline-block;
padding: 10px 20px;
background-color: #0066cc;
color: white;
text-decoration: none;
border-radius: 5px;
transition: background-color 0.3s;
}
.report-link:hover {
background-color: #0052a3;
}
.timestamp {
color: #666;
font-size: 0.9em;
margin-top: 10px;
}
.info {
background-color: #e7f3ff;
border-left: 4px solid #0066cc;
padding: 15px;
margin: 20px 0;
}
</style>
</head>
<body>
<h1>🚀 Launch Initiative - Flight Software Test Reports</h1>
<div class="info">
<strong>Latest Reports:</strong> These reports are automatically generated from the latest main branch builds.
</div>
<div class="report-section">
<h2>📦 Build Samples</h2>
<p>Test results for sample applications and test suites.</p>
<div class="report-links">
<a href="samples/twister.html" class="report-link">HTML Report</a>
<a href="samples/twister.json" class="report-link">JSON Data</a>
<a href="samples/twister.xml" class="report-link">XML Report</a>
</div>
</div>
<div class="report-section">
<h2>🛠️ Build Projects</h2>
<p>Test results for hardware project builds.</p>
<div class="report-links">
<a href="projects/twister.html" class="report-link">HTML Report</a>
<a href="projects/twister.json" class="report-link">JSON Data</a>
<a href="projects/twister.xml" class="report-link">XML Report</a>
</div>
</div>
<div class="report-section">
<h2>ℹ️ About These Reports</h2>
<p>
These reports are generated using Zephyr's Twister testing framework.
They provide detailed information about build results, test execution, and code quality metrics.
</p>
<ul>
<li><strong>HTML Report:</strong> Interactive web view with detailed test results and logs</li>
<li><strong>JSON Data:</strong> Machine-readable format for automated analysis</li>
<li><strong>XML Report:</strong> Standard format compatible with CI/CD tools</li>
</ul>
<p class="timestamp">
Generated: <span id="timestamp"></span>
</p>
</div>
<script>
document.getElementById('timestamp').textContent = new Date().toLocaleString();
</script>
</body>
</html>
EOF
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'reports'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4