Skip to content

Commit 9efc7c1

Browse files
authored
fix: better uploads (#18)
1 parent 96810ce commit 9efc7c1

File tree

2 files changed

+15
-22
lines changed

2 files changed

+15
-22
lines changed

action.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -138,33 +138,24 @@ runs:
138138
retention-days: 90
139139
include-hidden-files: true
140140

141-
- name: Upload benchmarks
141+
- name: Upload artifacts (benchmarks)
142142
if: ${{ inputs.step == 'run-self-hosted-validation' }}
143143
uses: actions/upload-artifact@v4
144144
with:
145145
name: benchmarks
146146
path: |
147-
~/${{ github.repository }}/main/.snakemake/
148-
~/${{ github.repository }}/feature/logs/
147+
~/${{ github.repository }}/main/benchmarks/
148+
~/${{ github.repository }}/feature/benchmarks/
149149
retention-days: 90
150150
include-hidden-files: true
151151

152-
- name: Upload artifacts (results main)
152+
- name: Upload artifacts (results)
153153
if: ${{ inputs.step == 'run-self-hosted-validation' }}
154154
uses: actions/upload-artifact@v4
155155
with:
156-
name: results (main branch)
156+
name: results
157157
path: |
158158
~/${{ github.repository }}/main/results
159-
retention-days: 90
160-
include-hidden-files: true
161-
162-
- name: Upload artifacts (results feature)
163-
if: ${{ inputs.step == 'run-self-hosted-validation' }}
164-
uses: actions/upload-artifact@v4
165-
with:
166-
name: results (feature branch)
167-
path: |
168159
~/${{ github.repository }}/feature/results
169160
retention-days: 90
170161
include-hidden-files: true
@@ -320,8 +311,8 @@ runs:
320311
mkdir -p "_validation-images/main/${subpath}"
321312
mkdir -p "_validation-images/feature/${subpath}"
322313
323-
cp "$HOME/artifacts/results (main branch)/${PREFIX_MAIN}/${subpath}/${plot}" "_validation-images/main/${subpath}/" || true # ignore if run failed
324-
cp "$HOME/artifacts/results (feature branch)/${PREFIX_FEATURE}/${subpath}/${plot}" "_validation-images/feature/${subpath}/" || true # ignore if run failed
314+
cp "$HOME/artifacts/results/main/results/${PREFIX_MAIN}/${subpath}/${plot}" "_validation-images/main/${subpath}/" || true # ignore if run failed
315+
cp "$HOME/artifacts/results/feature/results/${PREFIX_FEATURE}/${subpath}/${plot}" "_validation-images/feature/${subpath}/" || true # ignore if run failed
325316
done
326317
327318
# Add plots to repo branch

scripts/draft_comment.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,23 @@ def __init__(self):
145145
"""Initialize class."""
146146
self.dir_main = [
147147
file
148-
for file in (self.dir_artifacts / "results (main branch)").iterdir()
148+
for file in (self.dir_artifacts / "results/main/results").iterdir()
149149
if file.is_dir()
150150
]
151151
if len(self.dir_main) != 1:
152-
msg = "Expected exactly one directory in 'results (main branch)'."
152+
msg = "Expected exactly one directory (prefix) in 'results/main/results'."
153153
raise ValueError(msg)
154154
self.dir_main = self.dir_main[0]
155155

156156
self.dir_feature = [
157157
file
158-
for file in (self.dir_artifacts / "results (feature branch)").iterdir()
158+
for file in (self.dir_artifacts / "results/feature/results").iterdir()
159159
if file.is_dir()
160160
]
161161
if len(self.dir_feature) != 1:
162-
msg = "Expected exactly one directory in 'results (feature branch)'."
162+
msg = (
163+
"Expected exactly one directory (prefix) in 'results/feature/results'."
164+
)
163165
raise ValueError(msg)
164166
self.dir_feature = self.dir_feature[0]
165167

@@ -257,8 +259,8 @@ def changed_variables_plots(self) -> str:
257259
url_b = self.plots_base_url + "feature/" + plot
258260
rows.append(
259261
[
260-
f'<img src="{url_a}" alt="Error in loading image.">',
261-
f'<img src="{url_b}" alt="Error in loading image.">',
262+
f'<img src="{url_a}" alt="Image not available">',
263+
f'<img src="{url_b}" alt="Image not available">',
262264
]
263265
)
264266

0 commit comments

Comments
 (0)