@@ -17,20 +17,10 @@ jobs:
17
17
uses : actions/setup-python@v5
18
18
with :
19
19
python-version : " 3.10"
20
- - name : 🏗 Install build dependencies
21
- run : >-
22
- python -m pip install wheel build twine --user
23
- - name : 🔨 Build a binary wheel and a source tarball
24
- run : >-
25
- python -m build
26
- - name : 🧪 Check that twine is happy with it
27
- run : >-
28
- twine check --strict dist/*
29
- - name : ⬆ Upload build result
30
- uses : actions/upload-artifact@v4
20
+ - name : 🔨 Build distribution
21
+ uses : OctoPrint/actions/build-dist@main
31
22
with :
32
- name : dist
33
- path : dist
23
+ artifact : dist
34
24
35
25
pre-commit :
36
26
name : 🧹 Pre-commit
67
57
pip install -e .[develop]
68
58
- name : 🚀 Run test suite
69
59
run : |
70
- pytest
60
+ pytest | tee report.txt
61
+
62
+ # generate summary
63
+ python=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')
64
+ today=$(date +'%Y-%m-%d')
65
+ now=$(date +'%H:%M')
66
+ summary=$(tail -n1 report.txt | sed 's/^=*\s//g' | sed 's/\s=*$//g')
67
+
68
+ cat << EOF >> $GITHUB_STEP_SUMMARY
69
+ ### Test Report
70
+
71
+ *generated on $today at $now under Python $python*
72
+
73
+ <details>
74
+ <summary>$summary</summary>
75
+
76
+ \`\`\`
77
+ $(cat report.txt)
78
+ \`\`\`
79
+
80
+ </details>
81
+ EOF
71
82
72
83
test-install :
73
84
name : 🧪 Installation test
@@ -137,6 +148,10 @@ jobs:
137
148
with :
138
149
name : dist
139
150
path : dist
151
+ - name : 🧹 Remove some stuff that won't make it through twine check
152
+ run : |
153
+ rm dist/*.source.tar.gz
154
+ rm dist/sha512sums.txt
140
155
- name : 📦 Publish to index
141
156
uses : pypa/gh-action-pypi-publish@release/v1
142
157
with :
@@ -158,5 +173,9 @@ jobs:
158
173
with :
159
174
name : dist
160
175
path : dist
176
+ - name : 🧹 Remove some stuff that won't make it through twine check
177
+ run : |
178
+ rm dist/*.source.tar.gz
179
+ rm dist/sha512sums.txt
161
180
- name : 📦 Publish to index
162
181
uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments