Skip to content

Commit

Permalink
Remove volto-slate hard dependency on react
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Feb 7, 2025
1 parent 43df0e9 commit c968e9b
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 5 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/cookieplone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,63 @@ jobs:
with:
name: cypress-videos
path: packages/seven/cypress/videos

volto:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
name: Volto Cookieplone
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- run: echo "Current branch is ${GITHUB_REF#refs/heads/}"
- name: Set up Node.js environment
uses: ./.github/actions/node_env_setup
with:
node-version: ${{ matrix.node-version }}

- name: Generate Cookieplone-based frontend addon
run: |
pipx install cookieplone
pipx run --no-cache cookieplone frontend_addon --no-input
- name: Install generated package
working-directory: frontend-addon
run: |
pnpm dlx mrs-developer missdev --no-config --fetch-https
(cd core && git fetch --depth 1 origin ${GITHUB_REF#refs/heads/}:${GITHUB_REF#refs/heads/} && git checkout ${GITHUB_REF#refs/heads/})
pnpm i
- name: Cypress acceptance tests
uses: cypress-io/github-action@v6
env:
BABEL_ENV: production
CYPRESS_RETRIES: 2
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
install: false
working-directory: frontend-addon
browser: chrome
spec: cypress/tests/core/basic/**/*.cy.ts
start: |
make ci-acceptance-backend-start
make project-acceptance-frontend-prod-start
wait-on: 'npx wait-on --httpTimeout 20000 http-get://127.0.0.1:55001/plone http://127.0.0.1:3000'

# Upload Cypress screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: packages/seven/cypress/screenshots
# Upload Cypress videos
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: packages/seven/cypress/videos
6 changes: 4 additions & 2 deletions packages/volto-slate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"is-url": "1.2.4",
"jsdom": "^16.6.0",
"lodash": "4.17.21",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-intersection-observer": "9.1.0",
"react-intl": "3.12.1",
"react-redux": "8.1.2",
Expand All @@ -46,6 +44,10 @@
"babel-plugin-transform-class-properties": "^6.24.1",
"release-it": "^17.0.0"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"scripts": {
"dry-release": "release-it --dry-run",
"release": "release-it",
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

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

1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ packages:
- 'packages/*'
# all packages in subdirs of components/
- 'apps/*'
- 'apps/plone/src/addons/*'
# exclude packages that are inside test directories
- '!**/test/**'
- '!packages/volto-guillotina'

0 comments on commit c968e9b

Please sign in to comment.