Skip to content

Commit

Permalink
Upload test artifact to the summary.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Apr 23, 2024
1 parent ea7379d commit f2dae9b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,43 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
run: npm install

- name: Composer (optional)
run: composer install
continue-on-error: true

- name: Build (optional)
run: npm run build
continue-on-error: true

- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}

- name: Set up WP environment
run: npm run env:start

- name: Test
run: npm run cypress:run

- name: Update summary
if: always()
run: |
npx mochawesome-merge ./tests/cypress/reports/*.json -o tests/cypress/reports/mochawesome.json
rm -rf ./tests/cypress/reports/mochawesome-*.json
npx mochawesome-json-to-md -p ./tests/cypress/reports/mochawesome.json -o ./tests/cypress/reports/mochawesome.md
npx mochawesome-report-generator tests/cypress/reports/mochawesome.json -o tests/cypress/reports/
cat ./tests/cypress/reports/mochawesome.md >> $GITHUB_STEP_SUMMARY
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-artifact-windows-azure-storage
retention-days: 2
path: |
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/

0 comments on commit f2dae9b

Please sign in to comment.