-
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.
Reorganize repository to use new Volto add-on format based on cookiec…
…utter-volto (#4) * Reorganize repository to use new Volto add-on format based on cookiecutter-volto * Reorganize repository to use new Volto add-on format based on cookiecutter-volto * Rename profile * Force load of Vlibras in Storybook
- Loading branch information
Showing
55 changed files
with
29,686 additions
and
516 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
module.exports = { | ||
extends: './core/packages/volto/.eslintrc', | ||
rules: { | ||
'import/no-unresolved': 1, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
alias: { | ||
map: [ | ||
['@plone/volto', './core/packages/volto/src'], | ||
['@plone/volto-slate', './core/packages/volto-slate/src'], | ||
['@plone/registry', './core/packages/registry/src'], | ||
[ | ||
'@plonegovbr/volto-vlibras', | ||
'./packages/volto-vlibras/src', | ||
], | ||
], | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: Acceptance tests | ||
on: | ||
push: | ||
paths: | ||
- "*.js" | ||
- "*.json" | ||
- "*.yaml" | ||
- "cypress/**" | ||
- "packages/**" | ||
|
||
env: | ||
NODE_VERSION: 20.x | ||
CYPRESS_RETRIES: 2 | ||
|
||
jobs: | ||
|
||
acceptance: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- uses: pnpm/action-setup@v3 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
# We don't want to install until later, | ||
# when the cache and Cypress are in place | ||
run_install: false | ||
|
||
- 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 start-test-acceptance-server-ci & | ||
make start-test-acceptance-frontend & | ||
# 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 test-acceptance-headless | ||
|
||
# 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 |
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,63 @@ | ||
name: Changelog check | ||
on: | ||
pull_request: | ||
types: [assigned, opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
|
||
env: | ||
NODE_VERSION: 20.x | ||
ADDON_NAME: volto-vlibras | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Fetch all history | ||
fetch-depth: '0' | ||
|
||
- name: Install pipx | ||
run: pip install towncrier | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- uses: pnpm/action-setup@v3 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
# We don't want to install until later, | ||
# when the cache and Cypress are in place | ||
run_install: false | ||
|
||
- 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: 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 ${BASE_BRANCH} | ||
towncrier check --dir packages/${ADDON_NAME} | ||
env: | ||
BASE_BRANCH: ${{ github.base_ref }} | ||
if: github.event_name == 'pull_request' |
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,56 +1,51 @@ | ||
name: Code analysis checks | ||
on: [push] | ||
on: | ||
push: | ||
paths: | ||
- "*.js" | ||
- "*.json" | ||
- "*.yaml" | ||
- "packages/**" | ||
|
||
env: | ||
NODE_VERSION: 20.x | ||
|
||
jobs: | ||
build: | ||
codeanalysis: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
python-version: [3.9] | ||
env: | ||
NAMESPACE: '@plonegovbr' | ||
GIT_NAME: volto-vlibras | ||
GIT_USER: 'plonegovbr' | ||
GIT_BRANCH: ${GITHUB_REF##*/} | ||
|
||
steps: | ||
- name: Main checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
# node setup | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
# node cache | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/cache@v1 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
# node install | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install yo and @plone/generator-volto | ||
run: npm i -g yo @plone/generator-volto | ||
- uses: pnpm/action-setup@v3 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
# We don't want to install until later, | ||
# when the cache is in place | ||
run_install: false | ||
|
||
- name: Setup addon testing environment | ||
run: npx -p @plone/scripts addon clone https://github.com/${{env.GIT_USER}}/${{env.GIT_NAME}}.git --branch ${{env.GIT_BRANCH}} | ||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
# ESlint | ||
- name: ESlint | ||
run: cd addon-testing-project && yarn && yarn lint | ||
- 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- | ||
# # Stylelint | ||
# - name: Stylelint | ||
# run: cd addon-testing-project && yarn && yarn stylelint | ||
- name: Install dependencies | ||
run: make install | ||
|
||
# Prettier | ||
- name: Prettier | ||
run: cd addon-testing-project && yarn && yarn prettier:ci | ||
- 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,51 @@ | ||
name: i18n | ||
on: | ||
push: | ||
paths: | ||
- "*.js" | ||
- "*.json" | ||
- "*.yaml" | ||
- "packages/**" | ||
|
||
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 }} | ||
|
||
- uses: pnpm/action-setup@v3 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
# We don't want to install until later, | ||
# when the cache and Cypress are in place | ||
run_install: false | ||
|
||
- 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 |
Oops, something went wrong.