Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions .github/workflows/reusable_ragger_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,21 @@
app_branch_name: ${{ inputs.app_branch_name }}
pytest_directory: ${{ inputs.test_dir }}

white_space_removal:
name: Whitespace removal
runs-on: ubuntu-22.04
steps:
- name: Remove whitespaces
id: whitespace-removal
run: |
NO_SPACE_TEST_OPTIONS="$(echo "${{ inputs.test_options }}" | tr -d '[:space:]')"
echo "test_options=$NO_SPACE_TEST_OPTIONS" >> "$GITHUB_OUTPUT"
outputs:
test_options: ${{ steps.whitespace-removal.outputs.test_options }}

ragger_tests:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
name: Functional tests with Ragger
needs: [call_get_app_metadata, call_get_test_metadata]
needs: [call_get_app_metadata, call_get_test_metadata, white_space_removal]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -209,14 +221,14 @@
uses: actions/upload-artifact@v4
with:
# Make the artifact name unique to allow running this job in parallel
name: tests_snapshots${{ inputs.test_options }}-${{ matrix.device }}
name: tests_snapshots${{ needs.white_space_removal.outputs.test_options }}-${{ matrix.device }}
path: ${{ needs.call_get_test_metadata.outputs.pytest_directory }}/snapshots-tmp

- name: Upload snapshots on success if needed
if: ${{ inputs.regenerate_snapshots == true }}
uses: actions/upload-artifact@v4
with:
name: tests_snapshots${{ inputs.test_options }}-${{ matrix.device }}
name: tests_snapshots${{ needs.white_space_removal.outputs.test_options }}-${{ matrix.device }}
path: ${{ needs.call_get_test_metadata.outputs.pytest_directory }}/snapshots-tmp

- name: Set upload flag
Expand All @@ -231,18 +243,18 @@
merge_artifacts_if_needed:
# Merge matrix output
name: Merge snapshots artifacts
needs: ragger_tests
needs: [ragger_tests, white_space_removal]
runs-on: ubuntu-22.04
steps:
- uses: actions/upload-artifact/merge@v4
if: ${{ needs.ragger_tests.outputs.snapshot_artifact_uploaded == 'true' }}
with:
name: tests_snapshots${{ inputs.test_options }}
pattern: tests_snapshots${{ inputs.test_options }}-*
name: tests_snapshots${{ needs.white_space_removal.outputs.test_options }}
pattern: tests_snapshots${{ needs.white_space_removal.outputs.test_options }}-*
delete-merged: true

outputs:
snapshot_artifact_name: tests_snapshots${{ inputs.test_options }}
snapshot_artifact_name: tests_snapshots${{ needs.white_space_removal.outputs.test_options }}

pr_new_snapshots:
name: Open a PR with the new snapshots
Expand Down
Loading