Skip to content

Commit 1b9bade

Browse files
authored
Merge pull request #1563 from rostalan/main
fix(tests): Fixes for the basic plugin verification
2 parents e363525 + 11c3e0d commit 1b9bade

File tree

3 files changed

+198
-170
lines changed

3 files changed

+198
-170
lines changed

.github/workflows/pr-actions.yaml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,26 +197,65 @@ jobs:
197197
if: needs.parse.outputs.command_name == 'publish' && needs.prepare.outputs.overlay-branch != '' && needs.prepare.outputs.workspace != '' && needs.export.outputs.published-exports != ''
198198
runs-on: ubuntu-latest
199199
steps:
200-
- name: Write published exports and meta
200+
- name: Write and stage meta.json
201201
env:
202-
PUBLISHED_EXPORTS: ${{ needs.export.outputs.published-exports }}
203202
WORKSPACE: ${{ needs.prepare.outputs.workspace }}
204203
OVERLAY_BRANCH: ${{ needs.prepare.outputs.overlay-branch }}
205204
OVERLAY_REPO: ${{ needs.prepare.outputs.overlay-repo }}
205+
OVERLAY_COMMIT: ${{ needs.prepare.outputs.overlay-commit }}
206206
PR_NUMBER: ${{ needs.prepare.outputs.pr-number }}
207207
run: |
208208
mkdir -p published-exports
209-
printf "%s\n" "$PUBLISHED_EXPORTS" > published-exports/published-exports.txt
210209
cat > published-exports/meta.json <<EOF
211-
{"workspace":"${WORKSPACE}","overlayBranch":"${OVERLAY_BRANCH}","overlayRepo":"${OVERLAY_REPO}","overlayCommit":"${{ needs.prepare.outputs.overlay-commit }}","pr":${PR_NUMBER}}
210+
{"workspace":"${WORKSPACE}","overlayBranch":"${OVERLAY_BRANCH}","overlayRepo":"${OVERLAY_REPO}","overlayCommit":"${OVERLAY_COMMIT}","pr":${PR_NUMBER}}
212211
EOF
212+
- name: Stage published exports content
213+
env:
214+
PUBLISHED_EXPORTS: ${{ needs.export.outputs.published-exports }}
215+
run: |
216+
printf "%s\n" "$PUBLISHED_EXPORTS" > published-exports/published-exports.txt
213217
- name: Upload published-exports artifact
214218
uses: actions/upload-artifact@v4
215219
with:
216220
name: published-exports
217-
path: published-exports
221+
path: published-exports/
218222
if-no-files-found: error
219223
retention-days: 7
224+
- name: Upload context artifact
225+
uses: actions/upload-artifact@v4
226+
with:
227+
name: context-${{ github.run_id }}
228+
path: published-exports/meta.json
229+
if-no-files-found: error
230+
retention-days: 1
231+
232+
create_test_context:
233+
name: Create Test Context
234+
needs:
235+
- parse
236+
- prepare
237+
if: needs.parse.outputs.command_name == 'test' && needs.prepare.outputs.pr-number != ''
238+
runs-on: ubuntu-latest
239+
steps:
240+
- name: Write meta.json for test context
241+
env:
242+
WORKSPACE: ${{ needs.prepare.outputs.workspace }}
243+
OVERLAY_BRANCH: ${{ needs.prepare.outputs.overlay-branch }}
244+
OVERLAY_REPO: ${{ needs.prepare.outputs.overlay-repo }}
245+
OVERLAY_COMMIT: ${{ needs.prepare.outputs.overlay-commit }}
246+
PR_NUMBER: ${{ needs.prepare.outputs.pr-number }}
247+
run: |
248+
mkdir -p context
249+
cat > context/meta.json <<EOF
250+
{"workspace":"${WORKSPACE}","overlayBranch":"${OVERLAY_BRANCH}","overlayRepo":"${OVERLAY_REPO}","overlayCommit":"${OVERLAY_COMMIT}","pr":${PR_NUMBER}}
251+
EOF
252+
- name: Upload test-context artifact
253+
uses: actions/upload-artifact@v4
254+
with:
255+
name: context-${{ github.run_id }}
256+
path: context/meta.json
257+
if-no-files-found: error
258+
retention-days: 1
220259

221260
checkBackstageCompatibility:
222261
name: Check workspace backstage compatibility

.github/workflows/prepare-test-config.yaml

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)