From 75db5a4c5537417b2b996fb52c27b6613513b49f Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 10 Feb 2023 13:43:20 +0100 Subject: [PATCH 1/3] Update Snapshot Action: fix handling of the `browser` option --- .github/actions/update-snapshots/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/update-snapshots/action.yml b/.github/actions/update-snapshots/action.yml index ee14cb2..6786f2f 100644 --- a/.github/actions/update-snapshots/action.yml +++ b/.github/actions/update-snapshots/action.yml @@ -26,7 +26,7 @@ inputs: browser: description: The playwright browser to install (one of [`chromium`, `firefox`, `webkit`]) required: false - default: chromium + default: '' continue_on_error: description: Whether to continue on error when updating snapshots or not (one of [`yes`, `no`]). required: false @@ -66,7 +66,7 @@ runs: working-directory: ${{ inputs.test_folder }} run: | yarn install - yarn run playwright install ${{ inputs.chromium }} + yarn run playwright install ${{ inputs.browser }} - name: Wait for the server if: ${{ inputs.start_server_script != 'null' }} @@ -80,7 +80,7 @@ runs: continue-on-error: ${{ inputs.continue_on_error == 'yes' }} shell: bash -l {0} working-directory: ${{ inputs.test_folder }} - run: yarn run ${{ inputs.update_script }} + run: yarn run ${{ inputs.update_script }} --browser ${{ inputs.browser }} - name: Compress snapshots if: ${{ runner.os == 'Linux' }} From adafd31c283f691b680f69349dcbb04da5b34b74 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 2 May 2023 10:33:10 +0200 Subject: [PATCH 2/3] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: MichaƂ Krassowski <5832902+krassowski@users.noreply.github.com> --- .github/actions/update-snapshots/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/update-snapshots/action.yml b/.github/actions/update-snapshots/action.yml index 6786f2f..4a3ecc1 100644 --- a/.github/actions/update-snapshots/action.yml +++ b/.github/actions/update-snapshots/action.yml @@ -26,7 +26,7 @@ inputs: browser: description: The playwright browser to install (one of [`chromium`, `firefox`, `webkit`]) required: false - default: '' + default: chromium continue_on_error: description: Whether to continue on error when updating snapshots or not (one of [`yes`, `no`]). required: false @@ -80,7 +80,7 @@ runs: continue-on-error: ${{ inputs.continue_on_error == 'yes' }} shell: bash -l {0} working-directory: ${{ inputs.test_folder }} - run: yarn run ${{ inputs.update_script }} --browser ${{ inputs.browser }} + run: yarn run ${{ inputs.update_script }} --browser '${{ inputs.browser }}' - name: Compress snapshots if: ${{ runner.os == 'Linux' }} From 6e0d9199ddc8321a49378bcbd71195bc03de2980 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 5 Sep 2023 15:13:44 +0200 Subject: [PATCH 3/3] Append `${{ inputs.browser }}` to the artifact name --- .github/actions/update-snapshots/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/update-snapshots/action.yml b/.github/actions/update-snapshots/action.yml index 4a3ecc1..2d7463a 100644 --- a/.github/actions/update-snapshots/action.yml +++ b/.github/actions/update-snapshots/action.yml @@ -97,7 +97,7 @@ runs: - name: Upload snapshots as artifacts uses: actions/upload-artifact@v3 with: - name: ${{ inputs.artifact_name }} + name: ${{ inputs.artifact_name }}-${{ inputs.browser }} path: ${{ inputs.test_folder }}/**/*-snapshots/*.* - name: Commit new snapshots