diff --git a/.github/workflows/test-artifacts.yml b/.github/workflows/test-artifacts.yml new file mode 100644 index 0000000..6872127 --- /dev/null +++ b/.github/workflows/test-artifacts.yml @@ -0,0 +1,35 @@ +name: Upload Test Artifacts + +on: + workflow_call: + inputs: + artifact-name: + required: false + type: string + default: 'failed-test-screenshots' + artifact-path: + required: false + type: string + default: 'var/www/behat-output/*.png' + retention-days: + required: false + type: number + default: 14 + +jobs: + upload-test-artifacts: + runs-on: ubuntu-latest + steps: + - name: List screenshot files + run: | + ls -l build/project/behat-output/ || true + ls -l var/www/behat-output/ || true + ls -l var/www/html/build/project/behat-output || true + ls -l + - name: Upload screenshots from failed tests + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.artifact-name }} + path: ${{ inputs.artifact-path }} + if-no-files-found: ignore + retention-days: ${{ inputs.retention-days }}