Skip to content

Commit 958c8ee

Browse files
committed
test: pass mpkit-url from deploy to test via job outputs
Refactor instance URL handling to use job outputs instead of querying the CI repository in the test job. Changes: - Deploy job: add mpkit-url output from reserve step - Test job: use deploy job output for MPKIT_URL environment variable - Test job: remove redundant "Get reserved instance URL" step - Test job: move MPKIT_URL to job-level env for cleaner configuration This simplifies the workflow by eliminating an extra API call to retrieve the instance URL that was already reserved in the deploy job.
1 parent 2cad645 commit 958c8ee

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

.github/workflows/test-e2e.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ jobs:
109109
CI: true
110110
MPKIT_EMAIL: ${{ secrets.MPKIT_EMAIL }}
111111
NPM_CONFIG_CACHE: ${{ github.workspace }}/.npm
112+
outputs:
113+
mpkit-url: ${{ steps.reserve.outputs.mpkit-url }}
112114
steps:
113115
- name: Check if this module changed
114116
id: changed
@@ -185,8 +187,9 @@ jobs:
185187
CI: true
186188
E2E_TEST_PASSWORD: ${{ secrets.E2E_TEST_PASSWORD }}
187189
MPKIT_EMAIL: ${{ secrets.MPKIT_EMAIL }}
188-
HTML_ATTACHMENTS_BASE_URL: ${{ vars.HTML_ATTACHMENTS_BASE_URL }}
190+
MPKIT_URL: ${{ needs.reserve-and-deploy.outputs.mpkit-url }}
189191
NPM_CONFIG_CACHE: ${{ github.workspace }}/.npm
192+
HTML_ATTACHMENTS_BASE_URL: ${{ vars.HTML_ATTACHMENTS_BASE_URL }}
190193
TEST_REPORT_MPKIT_URL: ${{ vars.TEST_REPORT_MPKIT_URL }}
191194
TEST_REPORT_MPKIT_TOKEN: ${{ secrets.TEST_REPORT_MPKIT_TOKEN }}
192195
steps:
@@ -200,24 +203,13 @@ jobs:
200203
echo "skip=false" >> $GITHUB_OUTPUT
201204
fi
202205
203-
- name: Get reserved instance URL
204-
if: steps.changed.outputs.skip != 'true'
205-
id: get-url
206-
uses: Platform-OS/ci-repository-reserve-instance-url@0.1.2
207-
with:
208-
repository-url: ${{ vars.CI_PS_REPOSITORY_URL }}
209-
method: get-url
210-
pos-ci-repo-token: ${{ secrets.POS_CI_PS_REPO_ACCESS_TOKEN }}
211-
212206
- uses: actions/checkout@v4
213207
if: steps.changed.outputs.skip != 'true'
214208

215209
- name: Run Playwright tests
216210
if: steps.changed.outputs.skip != 'true'
217211
shell: sh
218212
working-directory: ${{ matrix.path }}
219-
env:
220-
MPKIT_URL: ${{ steps.get-url.outputs.mpkit-url }}
221213
run: |
222214
set -eu
223215
${{ matrix.test-commands }}

0 commit comments

Comments
 (0)