-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #21 Migrating steps * #21-migration-fixing ci * #21: fix ci * Revert changes in the previous commits * #21:fix cypress test * Try to fix the commented out subtest * fix cypress * fix heading cypress * fix cypress * fix the clssnames in cypress * fix: acceptance test fixed * chore * test * chore * version after new setup * fix: the version and restore files * fix: restore previously changed files * fix: add missing parameters in package.json * fix: include js and jsx files * Fix images in README --------- Co-authored-by: Victor Fernandez de Alba <[email protected]>
- Loading branch information
1 parent
c410f6c
commit a2f0d48
Showing
73 changed files
with
31,552 additions
and
9,998 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const fs = require('fs'); | ||
const projectRootPath = __dirname; | ||
const { AddonRegistry } = require('@plone/registry/addon-registry'); | ||
|
||
let coreLocation; | ||
if (fs.existsSync(`${projectRootPath}/core`)) | ||
coreLocation = `${projectRootPath}/core`; | ||
else if (fs.existsSync(`${projectRootPath}/../../core`)) | ||
coreLocation = `${projectRootPath}/../../core`; | ||
|
||
const { registry } = AddonRegistry.init(`${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}/packages/volto-slate/src`], | ||
['@plone/registry', `${coreLocation}/packages/registry/src`], | ||
[ | ||
'@kitconcept/volto-heading-block', | ||
'./packages/volto-heading-block/src', | ||
], | ||
...addonAliases, | ||
], | ||
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'], | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,47 @@ | ||
name: Code analysis checks | ||
on: [push] | ||
on: | ||
push: | ||
paths: | ||
- "*.js" | ||
- "*.json" | ||
- "*.yaml" | ||
- "packages/**" | ||
- ".github/workflows/code.yml" | ||
|
||
env: | ||
NODE_VERSION: 20.x | ||
|
||
jobs: | ||
codeanalysis: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Main checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
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: Install dependencies | ||
run: make install | ||
|
||
- name: Linting | ||
run: make lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: i18n | ||
on: | ||
push: | ||
paths: | ||
- "*.js" | ||
- "*.json" | ||
- "*.yaml" | ||
- "packages/**" | ||
- ".github/workflows/i18n.yml" | ||
|
||
env: | ||
NODE_VERSION: 20.x | ||
|
||
jobs: | ||
unit: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Main checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
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: Install dependencies | ||
run: make install | ||
|
||
- name: test i18n command | ||
run: make i18n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Storybook | ||
on: | ||
push: | ||
paths: | ||
- "*.js" | ||
- "*.json" | ||
- "*.yaml" | ||
- "packages/**" | ||
- ".github/workflows/storybook.yml" | ||
|
||
env: | ||
NODE_VERSION: 20.x | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
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: Install dependencies | ||
run: make install | ||
|
||
- name: Generate Storybook | ||
run: | | ||
make storybook-build | ||
- name: Deploy to GitHub pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
branch: gh-pages | ||
folder: .storybook-build |
Oops, something went wrong.