Skip to content

Commit

Permalink
Merge pull request #314 from 10up/update/298
Browse files Browse the repository at this point in the history
GH action summary for Cypress report
  • Loading branch information
peterwilsoncc authored May 8, 2023
2 parents 1c23424 + 065f658 commit 5818a6c
Show file tree
Hide file tree
Showing 5 changed files with 1,849 additions and 439 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches:
- develop
jobs:
build:
build:
uses: 10up/safe-redirect-manager/.github/workflows/build-release-zip.yml@develop
cypress:
needs: build
Expand Down Expand Up @@ -45,19 +45,28 @@ jobs:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm install
- name: Set the core version and plugins config
- name: Set the core version and plugins config
run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }}
- name: Set up WP environment
run: npm run env:start
- name: Test
run: npm run cypress:run
- name: Upload artifacts
uses: actions/upload-artifact@v2
- 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: Make artifacts available
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-artifact-safe-redirect-manager
retention-days: 7
name: cypress-artifact
retention-days: 2
path: |
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/
${{ github.workspace }}/tests/cypress/reports/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ artifacts
tests/cypress/downloads
tests/cypress/screenshots
tests/cypress/videos
tests/cypress/reports
.wp-env.override.json
.phpunit.result.cache
Loading

0 comments on commit 5818a6c

Please sign in to comment.