Skip to content

Commit

Permalink
Update actions/upload-artifact from v3 to v4 to use the latest versio…
Browse files Browse the repository at this point in the history
…n. Also fix E2E test artifacts generation by configuring jest-html-reporters. (#2180)

* Bump actions/upload-artifact from v3 to v4

* Try reverting to v3

* Use ubuntu-22.04

* Testing "E2E tests" workflow

* Add missing jest-html-reporters configuration

- Add jest-html-reporters configuration to generate HTML test reports
- Reports will be saved in ./artifacts/report.html

* Add jest-html-reporters to generate HTML test reports

* Remove failing tests which was added for testing

* Update jest-html-reporters version
  • Loading branch information
imanish003 authored Dec 27, 2024
1 parent 7100254 commit 09f8b6a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
Setup:
name: Setup
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Cache node modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
continue-on-error: true
- if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
name: Upload ESLint report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: eslint_report.json
path: eslint_report.json
Expand Down
29 changes: 27 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,17 @@
],
"globals": {
"STORE_URL": "http://localhost:8802"
}
},
"reporters": [
"default",
[
"jest-html-reporters",
{
"publicPath": "./artifacts",
"filename": "report.html"
}
]
]
},
"config": {
"wp_org_slug": "storefront",
Expand Down Expand Up @@ -90,6 +100,7 @@
"eslint-plugin-import": "2.29.1",
"github-label-sync": "2.3.1",
"jest-puppeteer": "10.1.0",
"jest-html-reporters": "^3.1.7",
"lodash": "4.17.21",
"node-wp-i18n": "1.2.7",
"onchange": "7.1.0",
Expand Down

0 comments on commit 09f8b6a

Please sign in to comment.