Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new addon structure #17

Open
wants to merge 226 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
004247a
Test also inflection, wildcard, exact, compounded words
ksuess Mar 17, 2024
cac6840
lint
ksuess Mar 17, 2024
dfd48d1
lint now with correct image plone/frontend-dev with Node 20
ksuess Mar 17, 2024
93ca69a
Remove fields: index server address and index: block requests do use …
ksuess Mar 19, 2024
0a48418
Create Dockerfile.dev
ksuess Mar 21, 2024
da488be
pre-weekend-commit dev docker setup
ksuess Mar 22, 2024
034a5a4
Fix Sidebar
ksuess Mar 24, 2024
3e97ffa
format
ksuess Mar 24, 2024
ce96bf8
Fix CI code, unit
ksuess Mar 24, 2024
fb038e8
Use SSL
ksuess Mar 26, 2024
ca5fb2c
Extend tests
ksuess Mar 26, 2024
70358bd
Fix acceptance setup
ksuess Mar 26, 2024
8bf05cf
Fix preprocessing for blocks_plaintext
ksuess Mar 26, 2024
d1652f1
Fix dev setup
ksuess Mar 26, 2024
e699bea
Add blocks_plaintext to default searched fields
ksuess Mar 26, 2024
a777846
Test Opensearch SSL False
ksuess Mar 26, 2024
e7b337f
Fix field type of review_state to keyword. Fix blocks_plaintext
ksuess Apr 2, 2024
7005f9b
Fix mapping of "subjects"
ksuess Apr 2, 2024
58377e9
docker dev: Do not delete existing Plone site
ksuess Apr 2, 2024
97e6a13
Add pure start development/demo
ksuess Apr 2, 2024
0941df5
Back to current behavior: "@components/blocks_plaintext"
ksuess Apr 3, 2024
5c399c2
Update keywords and lexicon for text analysis
ksuess Apr 3, 2024
61a90f1
cypress test 'I can search for a compounded word'
ksuess Apr 3, 2024
a0bae1b
Workarround authentication bug in cypress tests
ksuess Apr 5, 2024
1c04d03
Remove dependency of acceptance containers for dev with backend add-ons
ksuess Apr 5, 2024
4b041b9
Reorder preprocessings.json
ksuess Apr 5, 2024
3bb6cec
Comment out elastic_search_api_url and index
ksuess Apr 5, 2024
b57ca9c
Label for facet and meta data item
ksuess Apr 5, 2024
551130e
Prepare multilingual tests
ksuess Apr 10, 2024
c282951
cypress configuration
ksuess Apr 10, 2024
924875d
Update ci.yml: depends_on
ksuess Apr 10, 2024
16418f9
Create search.multilingual.cy.js
ksuess Apr 10, 2024
40bfd01
Fix typo
ksuess Apr 10, 2024
d544a52
Add multilingual container
ksuess Apr 10, 2024
7181cca
Update Makefile
ksuess Apr 10, 2024
a60c62c
React components: First working step with language
ksuess Apr 10, 2024
6318db3
Include language in request only if site isMultilingual
ksuess Apr 10, 2024
eccaed2
Reduce default cypress configuration
ksuess Apr 11, 2024
b65b2c0
Uncomment single language acceptance tests
ksuess Apr 11, 2024
61fd962
Loosen cypress default specPattern
ksuess Apr 11, 2024
4aa8772
Explicit singlelingual cypress configuration
ksuess Apr 11, 2024
5d20deb
Temporary change from 'de' to 'it' until plone.volto:multilingual is …
ksuess Apr 11, 2024
6aa7fc5
Update Dockerfile.acceptance.multilingual
ksuess Apr 11, 2024
ea7f21f
Fix CI multilingual
ksuess Apr 11, 2024
38a5224
Fix dev acceptance multilingual
ksuess Apr 11, 2024
16d2b4d
Uncomment CI single language tests
ksuess Apr 11, 2024
165c5b6
Extend multilingual tests
ksuess Apr 11, 2024
4b82100
Clean up docker compose
ksuess Apr 11, 2024
516353c
Clean up
ksuess Apr 11, 2024
1ece406
Multilingual: Add analyzer. Mappings with fields. Add lexicon, keywords
ksuess Apr 11, 2024
d689846
Request with fields according language (z.B. "title.de_exact^1.4")
ksuess Apr 11, 2024
9f5fa25
Test multilingual first
ksuess Apr 11, 2024
7f118d4
Fix docker compose
ksuess Apr 12, 2024
186d1af
Search in language fields, but do filter on language only if isMultil…
ksuess Apr 12, 2024
979cd92
Fixi
ksuess Apr 20, 2024
8c33e88
Increase version (already released 0.4.0)
ksuess Jun 7, 2024
afceb49
Remove redundancy
ksuess Jun 7, 2024
e2041fe
import { createPortal } from 'react-dom';
ksuess Jun 7, 2024
22ea139
Delete .project.eslintrc.js
ksuess Jun 7, 2024
11fb0af
Remove dependencies (moved to @plone/volto)
ksuess Jun 7, 2024
0dd45a1
Revert "Delete .project.eslintrc.js"
ksuess Jun 7, 2024
dd5eb22
Update .project.eslintrc.js
ksuess Jun 8, 2024
86fa7f7
Update package.json
ksuess Jun 8, 2024
e996a6f
Delete webpack.config.js
ksuess Jun 8, 2024
eb8c4c9
Update .gitignore
ksuess Jun 16, 2024
32d4f26
Show dates (optional). Fix Test panel.
ksuess Jun 16, 2024
39a547c
make opensearchandingest (containers)
ksuess Jun 16, 2024
95bc263
Create dockerfiles/_env
ksuess Jun 16, 2024
1783b22
Update README.md
ksuess Jun 16, 2024
cdb55d0
Update ci.yml
ksuess Jun 16, 2024
461dc64
Update ci.yml
ksuess Jun 16, 2024
5f30053
naming: monolingual
ksuess Jun 16, 2024
d64c2b7
ci tests: first monolingual, then multilingual
ksuess Jun 16, 2024
903aa8e
More TODOs
ksuess Jun 16, 2024
5b6e97e
default for new fields
ksuess Jun 16, 2024
75e91be
Fix ci: either monolingual ingest or multilingual
ksuess Jun 16, 2024
61a95e8
Update yarn.lock
ksuess Jun 16, 2024
7d98eff
TO BE REVERTED! Temporary testing with unreleased collective.elastic.…
ksuess Jun 16, 2024
e4f06bb
Update Dockerfile.acceptance
ksuess Jun 16, 2024
2ee9962
Add TODOs
ksuess Jun 16, 2024
9e7c66b
clean up docker-compose acceptance
ksuess Jun 16, 2024
25d7088
clean up docker-compose CI
ksuess Jun 16, 2024
531ae9b
Update create_search.monolingual.cy.js
ksuess Jun 16, 2024
3c19ef4
Update ci.yml
ksuess Jun 16, 2024
df36c3d
Update Dockerfile.acceptance
ksuess Jun 16, 2024
61d93dc
Update Dockerfile.acceptance
ksuess Jun 16, 2024
f1b114f
Update ci.yml Explicitly export port of frontend
ksuess Jun 17, 2024
1b87e16
Update Dockerfile.acceptance.multilingual
ksuess Jun 17, 2024
3dd350e
Fix cypress multilingual
ksuess Jun 17, 2024
5505df1
Update language.multilingual.cy.js
ksuess Jun 17, 2024
61834ad
Update acceptance.yml: Split into two jobs
ksuess Jun 17, 2024
f6aa4c4
Update ci.yml
ksuess Jun 18, 2024
4ac9f67
Fix tests
ksuess Jun 18, 2024
c5f3cab
Get testing profiles from rohberg.volto
ksuess Jun 18, 2024
7bc69b5
Update language.multilingual.cy.js
ksuess Jun 18, 2024
c363bbb
Get testing profiles from rohberg.volto
ksuess Jun 18, 2024
bc4e78e
Fix tests
ksuess Jun 18, 2024
8b77baa
Volto 18
ksuess Jun 18, 2024
ffeb224
Add missing arg rohberg.volto
ksuess Jun 18, 2024
2648155
set build seed backend
ksuess Jun 18, 2024
d56ac87
yarn -> pnpm. We are testing with Volt 18
ksuess Jun 18, 2024
08bf8a1
Revert "yarn -> pnpm. We are testing with Volt 18"
ksuess Jun 18, 2024
f949bc0
Revert "Volto 18"
ksuess Jun 18, 2024
626293b
Back to Volto 17
ksuess Jun 18, 2024
994a058
Add missing arg rohberg.volto
ksuess Jun 18, 2024
8ce0d09
Update docker-compose.yml
ksuess Jun 18, 2024
263abb7
apply collective.elastic.plone:default
ksuess Jun 18, 2024
00d36f1
Add cypress aliases
ksuess Jun 18, 2024
85aef66
Add missing cypress alias
ksuess Jun 18, 2024
5029ec6
Add wait after creating content. Give ingest time to ingest
ksuess Jun 18, 2024
0164d9b
Update .env celery log level debug
ksuess Jun 19, 2024
d17a125
Fix typo CELERY_LOG_LEVEL
ksuess Jun 19, 2024
2933406
Switch to collective.elastic.plone[redis,opensearch] from repo main b…
ksuess Jun 19, 2024
a84e378
warning about missing licence
ksuess Jun 19, 2024
a4fbdb9
Fix locked search page
ksuess Jun 19, 2024
ab4606d
Fix typo CELERY_LOGLEVEL
ksuess Jun 19, 2024
a7add6c
wait for search results
ksuess Jun 19, 2024
e8272cc
Cypress testing: More waits
ksuess Jun 19, 2024
747ded5
Renaming tests
ksuess Jun 19, 2024
ac6edb2
cy.addNewBlock. Remove waits. cy.navigate
ksuess Jun 19, 2024
9bdd5af
CYPRESS_RETRIES: 3
ksuess Jun 19, 2024
79e05de
Remove clear before type
ksuess Jun 19, 2024
daca3f2
secrets.GITHUB_TOKEN
ksuess Jun 19, 2024
bcb16ba
defaultCommandTimeout: 8000
ksuess Jun 19, 2024
9588fd9
increase timout
ksuess Jun 19, 2024
979e67c
Update search.monolingual.cy.js
ksuess Jun 19, 2024
bfc1fbe
cy.navigate -> cy.visit
ksuess Jun 19, 2024
cf74119
Check publishing date. Check start date of event
ksuess Jun 19, 2024
08c257a
Fix eslint
ksuess Jun 23, 2024
8479c8b
locales
ksuess Jun 23, 2024
db0b61f
Fix flattenESUrlToPath without backend_url from block data
ksuess Jun 23, 2024
de32360
Move messages
ksuess Jun 23, 2024
21597dc
Easier configuration of block: no backend_url anymore
ksuess Jun 23, 2024
a494447
Update Results.js
ksuess Jun 23, 2024
50b2575
Fix jumping of page when navigating on search page
ksuess Jun 23, 2024
a01311a
No more backend_url from block data. Refactoring translate function /…
ksuess Jun 23, 2024
c042122
Update springisnow-volto-searchkit-block.less
ksuess Jun 23, 2024
5367415
Update index.js
ksuess Jun 23, 2024
abe5ed8
UI test panel
ksuess Jun 23, 2024
049ce1a
UI test panel #2
ksuess Jun 23, 2024
64e08fe
fieldset with name 'default' is required
ksuess Jun 23, 2024
f958729
Add test 'I can open a result'
ksuess Jun 23, 2024
cc5580b
Fix flattenESUrlToPath for multiple scenarios where everthing is runn…
ksuess Jun 23, 2024
818625b
Show head_title in results if available
ksuess Jun 23, 2024
64444c0
Test with Volto 17 and 18alpha
ksuess Jun 23, 2024
6315a51
Update acceptance.yml
ksuess Jun 23, 2024
8dff275
Update helpers.test.js
ksuess Jun 23, 2024
4ee1fa6
Update acceptance.yml
ksuess Jun 23, 2024
194b65b
Update helpers.test.js
ksuess Jun 23, 2024
e9f72f7
Update unit.yml matrix Volto
ksuess Jun 23, 2024
d35490d
Update unit.yml
ksuess Jun 23, 2024
7ab6ac7
Update unit.yml
ksuess Jun 23, 2024
1643b29
Update unit.yml
ksuess Jun 23, 2024
9e07c4c
Update acceptance.yml (test with Volto 18 postponed: pnpm, new projec…
ksuess Jun 23, 2024
9b35e1e
Update acceptance.yml
ksuess Jun 23, 2024
abd7f48
Update acceptance.yml
ksuess Jun 23, 2024
b7347a0
Update .eslintrc.js
ksuess Jun 24, 2024
a02548b
Update .gitignore
ksuess Jun 24, 2024
fcddad9
configuration project
ksuess Jun 24, 2024
5ef3fb0
Create volto.config.js
ksuess Jun 24, 2024
efb1a02
Delete variables.mk
ksuess Jun 24, 2024
2512c03
Delete TODO.md
ksuess Jun 24, 2024
88ebbf1
Move src to packages/ and respect new files of new structure
ksuess Jun 24, 2024
5a5276a
Remove src/
ksuess Jun 24, 2024
31e71bd
New project package.json
ksuess Jun 24, 2024
4fcf9cd
Volto checked out with version tag
ksuess Jun 24, 2024
e9e831f
Remove locales from project
ksuess Jun 24, 2024
8ad07ec
Delete LICENSE
ksuess Jun 24, 2024
0bcc3aa
Create .pre-commit-config.yaml
ksuess Jun 24, 2024
1e895ea
storybook initial
ksuess Jun 24, 2024
34b9e24
new cypress initial
ksuess Jun 24, 2024
e4b9261
github workflow except acceptance
ksuess Jun 24, 2024
0795325
Remove old tests
ksuess Jun 24, 2024
ed2b3bc
Remove fixtures
ksuess Jun 24, 2024
7568418
Add tests
ksuess Jun 24, 2024
806989f
Remove old cypress stuff
ksuess Jun 24, 2024
f8807cb
Remove old acceptamce stuff
ksuess Jun 24, 2024
5357306
Create acceptance_default.yml.txt
ksuess Jun 24, 2024
0b6ac5c
Rename old Changelog in project root
ksuess Jun 24, 2024
069adf6
Update DEVELOPMENT.md
ksuess Jun 24, 2024
759047c
Create README_new.md
ksuess Jun 24, 2024
eda9cd0
Rename tests: first language type
ksuess Jun 24, 2024
4df801b
Remove old cypress config
ksuess Jun 24, 2024
d1dc442
Add language-configurator
ksuess Jun 24, 2024
2fdf223
Remove unnecessary language-configurator stuff
ksuess Jun 24, 2024
5ed5e56
Remove language-configurator completely
ksuess Jun 24, 2024
d30cac7
Remove frontend dockerfiles
ksuess Jun 24, 2024
517caf5
Fic Cypress tests
ksuess Jun 25, 2024
87341e3
Delete monolingual.basic.cy.js
ksuess Jun 25, 2024
9213ce3
Make acceptance tests
ksuess Jun 25, 2024
c9f018d
Add dependencies
ksuess Jun 25, 2024
e23b686
pre commit hook fails on pnpm not available
ksuess Jun 25, 2024
9b2ee78
pre commit hook missing pnpm
ksuess Jun 25, 2024
7e24ccd
public stuff
ksuess Jun 25, 2024
dca680e
Disable pre commit hooks
ksuess Jun 25, 2024
4f0b9b3
Make tracking configurable
ksuess Jun 25, 2024
e9a56eb
Fix initial adding of block
ksuess Jun 25, 2024
bedf0a7
Update volto.config.js (addon Matomo)
ksuess Jun 25, 2024
596ba30
locales
ksuess Jun 28, 2024
e7d86ab
Create TODO.md
ksuess Jun 28, 2024
f6c04ac
Update Makefile: Disable pre-commit
ksuess Jun 28, 2024
a80e815
Update Makefile
ksuess Jun 28, 2024
4a235c3
acceptance containers: all but frontend
ksuess Jun 28, 2024
0ea5a65
development containers: all but frontend
ksuess Jun 28, 2024
9235d1c
Rename ci.yml
ksuess Jun 28, 2024
bde2d79
frontend not anymore via containers. Language settings: see SEARCHKIT…
ksuess Jun 28, 2024
2be1a10
dockerfiles/.env needed for dev containers
ksuess Jun 28, 2024
cda3e40
valid opensearchpassword
ksuess Jun 28, 2024
84c69db
make dev
ksuess Jun 28, 2024
b27cc89
Update README.md
ksuess Jun 28, 2024
9280b99
Create pnpm-lock.yaml
ksuess Jun 28, 2024
8fbc345
Create .gitkeep
ksuess Jun 28, 2024
0d9efdd
Update github action acceptance
ksuess Jun 28, 2024
87abc7f
Update Makefile
ksuess Jun 28, 2024
af297a6
fix lint
ksuess Jun 28, 2024
fee3836
Rename ci.yml to ci-docker-compose.yml
ksuess Jun 28, 2024
d783ffa
frontend is a separate step
ksuess Jun 28, 2024
5014945
Fix port CI
ksuess Jun 28, 2024
d370b1c
Remove obsolete docker-compose version
ksuess Jun 28, 2024
4f7b6ee
wait-on
ksuess Jun 28, 2024
bde29cb
Typo acceptance.yml
ksuess Jun 28, 2024
ec95122
frontend not via containers
ksuess Jun 28, 2024
4642f21
CI: Fix backend port
ksuess Jun 28, 2024
f63f289
Update acceptance.yml
ksuess Jun 28, 2024
f42c245
Update acceptance.yml
ksuess Jun 28, 2024
9f8ab17
Update acceptance.yml
ksuess Jun 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const fs = require('fs');
const projectRootPath = __dirname;
const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry');

let coreLocation;
if (fs.existsSync(`${projectRootPath}/core`))
coreLocation = `${projectRootPath}/core`;
else if (fs.existsSync(`${projectRootPath}/../../core`))
coreLocation = `${projectRootPath}/../../core`;

const registry = new AddonConfigurationRegistry(
`${coreLocation}/packages/volto`,
);

// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
const addonAliases = Object.keys(registry.packages).map((o) => [
o,
registry.packages[o].modulePath,
]);

module.exports = {
extends: `${coreLocation}/packages/volto/.eslintrc`,
rules: {
'import/no-unresolved': 1,
},
settings: {
'import/resolver': {
alias: {
map: [
['@plone/volto', `${coreLocation}/packages/volto/src`],
[
'@plone/volto-slate',
`${coreLocation}/core/packages/volto-slate/src`,
],
['@plone/registry', `${coreLocation}/packages/registry/src`],
[
'@rohberg/volto-searchkit-block',
'./packages/volto-searchkit-block/src',
],
...addonAliases,
],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
},
},
};
110 changes: 86 additions & 24 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
name: Acceptance tests
on: [push]
on:
push:
paths:
- '*.js'
- '*.json'
- '*.yaml'
- 'cypress/**'
- 'packages/**'
- '.github/workflows/acceptance.yml'

env:
ADDON_NAME: "@rohberg/volto-searchkit-block"
ADDON_PATH: volto-searchkit-block
VOLTO_VERSION: 17
PLONE_VERSION: 6.0
NODE_VERSION: 20.x
CYPRESS_RETRIES: 3

INDEX_SERVER: opensearch:9200
INDEX_NAME: plone
INDEX_OPENSEARCH: 1
INDEX_USE_SSL: 0
INDEX_LOGIN: admin
INDEX_PASSWORD: "oxczBG).3xWyapLn"
INDEX_PASSWORD: 'oxczBG).3xWyapLn'

CELERY_BROKER: redis://redis:6379/0
CELERY_LOG_LEVEL: info
CELERY_LOGLEVEL: info

PLONE_SERVICE: http://backend-acceptance:55001
PLONE_SITE_PREFIX_PATH: plone
Expand All @@ -26,37 +33,92 @@ env:
PREPROCESSINGS_FILE: /configuration/preprocessings.json

jobs:
acceptance:
# TODO multilingual
acceptance-monolingual:
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable

- name: Install Cypress
- name: Get pnpm store directory
shell: bash
run: |
cd acceptance
yarn
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Cache Cypress Binary
id: cache-cypress-binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: binary-${{ env.NODE_VERSION }}-${{ hashFiles('pnpm-lock.yaml') }}

- name: Install dependencies
run: make install

- name: Install Cypress if not in cache
if: steps.cache-cypress-binary.outputs.cache-hit != 'true'
working-directory: core/packages/volto
run: make cypress-install

- uses: JarvusInnovations/background-action@v1
name: Start Frontend
# TODO instead of make ci-acceptance-backend-start, do like before 'docker compose -f ci.yml --profile prod up' see acceptance_old
with:
run: |
make acceptance-frontend-prod-start &
# your step-level and job-level environment variables are available to your commands as-is
# npm install will count towards the wait-for timeout
# whenever possible, move unrelated scripts to a different step
# to background multiple processes: add & to the end of the command

wait-on: |
http://localhost:3000
# IMPORTANT: to use environment variables in wait-on, you must use this form: ${{ env.VAR }}
# See wait-on section below for all resource types and prefixes

tail: true # true = stderr,stdout
# This will allow you to monitor the progress live

log-output-resume: stderr
# Eliminates previosuly output stderr log entries from post-run output

wait-for: 10m

log-output: stderr,stdout # same as true

log-output-if: failure

- name: "Cypress: Acceptance tests"
- name: 'Cypress: Acceptance tests - monolingual'
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:
config: pageLoadTimeout=100000,defaultCommandTimeout=8000
parallel: false
browser: chrome
working-directory: acceptance
spec: cypress/tests/*.cy.js
spec: cypress/tests/*.monolingual.cy.js
install: false
start: |
docker compose -f ci.yml --profile prod up
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000 http://localhost:9200'
docker compose -f ci-docker-compose.yml --profile prod up
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:9200'

# Upload Cypress screenshots
- uses: actions/upload-artifact@v4
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/acceptance_default.yml.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Acceptance tests
on:
push:
paths:
- "*.js"
- "*.json"
- "*.yaml"
- "cypress/**"
- "packages/**"
- ".github/workflows/acceptance.yml"

env:
NODE_VERSION: 20.x
CYPRESS_RETRIES: 2

jobs:

acceptance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Cache Cypress Binary
id: cache-cypress-binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: binary-${{ env.NODE_VERSION }}-${{ hashFiles('pnpm-lock.yaml') }}

- name: Install dependencies
run: make install

- name: Install Cypress if not in cache
if: steps.cache-cypress-binary.outputs.cache-hit != 'true'
working-directory: core/packages/volto
run: make cypress-install

- uses: JarvusInnovations/background-action@v1
name: Start Servers
with:
run: |
make ci-acceptance-backend-start &
make acceptance-frontend-prod-start &
# your step-level and job-level environment variables are available to your commands as-is
# npm install will count towards the wait-for timeout
# whenever possible, move unrelated scripts to a different step
# to background multiple processes: add & to the end of the command

wait-on: |
http-get://localhost:55001/plone
http://localhost:3000
# IMPORTANT: to use environment variables in wait-on, you must use this form: ${{ env.VAR }}
# See wait-on section below for all resource types and prefixes

tail: true # true = stderr,stdout
# This will allow you to monitor the progress live

log-output-resume: stderr
# Eliminates previosuly output stderr log entries from post-run output

wait-for: 10m

log-output: stderr,stdout # same as true

log-output-if: failure

- run: make ci-acceptance-test

# Upload Cypress screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots-acceptance
path: acceptance/cypress/screenshots

# Upload Cypress videos
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos-acceptance
path: acceptance/cypress/videos
35 changes: 25 additions & 10 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- main

env:
node-version: 20.x
NODE_VERSION: 20.x
ADDON_NAME: volto-searchkit-block

jobs:
build:
Expand All @@ -20,24 +21,38 @@ jobs:
- name: Install pipx
run: pip install towncrier

# node setup
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v3
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: 'yarn'
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

# node install
- name: Install dependencies
run: yarn
run: |
make install

- name: Check for presence of a Change Log fragment (only pull requests)
run: |
# Fetch the pull request' base branch so towncrier will be able to
# compare the current branch with the base branch.
# Source: https://github.com/actions/checkout/#fetch-all-branches.
git fetch --no-tags origin main
towncrier check --compare-with origin/main
git fetch --no-tags origin ${BASE_BRANCH}
towncrier check --dir packages/${ADDON_NAME}
env:
BASE_BRANCH: ${{ github.base_ref }}
if: github.event_name == 'pull_request'
Loading
Loading