-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Use new volto addon development setup
- Loading branch information
Showing
27 changed files
with
2,969 additions
and
135 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 |
---|---|---|
@@ -1,56 +1,23 @@ | ||
name: Code analysis checks | ||
on: [push] | ||
jobs: | ||
build: | ||
codeanalysis: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
python-version: [3.9] | ||
env: | ||
NAMESPACE: '@plonegovbr' | ||
GIT_NAME: volto-code-block | ||
GIT_USER: 'plonegovbr' | ||
GIT_BRANCH: ${GITHUB_REF##*/} | ||
python-version: [3.8] | ||
|
||
steps: | ||
- name: Main checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
# node setup | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
|
||
# 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 | ||
|
||
- name: Install yo and @plone/generator-volto | ||
run: npm i -g yo @plone/generator-volto | ||
|
||
- 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}} | ||
|
||
# ESlint | ||
- name: ESlint | ||
run: cd addon-testing-project && yarn && yarn lint | ||
|
||
# Stylelint | ||
- name: Stylelint | ||
run: cd addon-testing-project && yarn && yarn stylelint | ||
|
||
# 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 |
---|---|---|
|
@@ -11,10 +11,6 @@ jobs: | |
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Create a new Volto project | ||
run: | | ||
make project | ||
- name: Generate Storybook | ||
run: | | ||
make storybook | ||
|
@@ -23,4 +19,4 @@ jobs: | |
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: addon-testing-project/storybook-static | ||
folder: .storybook |
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,48 +1,23 @@ | ||
name: Unit tests | ||
name: Unit Tests | ||
on: [push] | ||
jobs: | ||
build: | ||
unit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
python-version: [3.9] | ||
env: | ||
NAMESPACE: '@plonegovbr' | ||
GIT_NAME: volto-code-block | ||
GIT_USER: 'plonegovbr' | ||
GIT_BRANCH: ${GITHUB_REF##*/} | ||
python-version: [3.8] | ||
|
||
steps: | ||
- name: Main checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
# node setup | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
|
||
# 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 | ||
|
||
- name: Install yo and @plone/generator-volto | ||
run: npm i -g yo @plone/generator-volto | ||
|
||
- 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}} | ||
|
||
# Unit tests | ||
- name: Unit tests | ||
run: cd addon-testing-project && yarn && CI=true yarn test | ||
- name: Linting | ||
run: make test-ci |
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ node_modules | |
cypress/videos/ | ||
results | ||
build | ||
.storybook | ||
*~ |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
node_modules | ||
cypress/videos/ | ||
results | ||
build | ||
*~ | ||
project | ||
addon-testing-project | ||
|
||
# yarn 3 | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions |
File renamed without changes.
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,36 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
addon-acceptance: | ||
build: | ||
context: ../ | ||
dockerfile: ./dockerfiles/Dockerfile | ||
args: | ||
ADDON_NAME: "${ADDON_NAME}" | ||
ADDON_PATH: "${ADDON_PATH}" | ||
VOLTO_VERSION: ${VOLTO_VERSION:-16} | ||
environment: | ||
RAZZLE_INTERNAL_API_PATH: http://backend-acceptance:55001/plone | ||
RAZZLE_API_PATH: http://localhost:55001/plone | ||
ports: | ||
- 3000:3000 | ||
depends_on: | ||
- backend-acceptance | ||
profiles: | ||
- prod | ||
|
||
backend-acceptance: | ||
image: plone/plone-backend:${PLONE_VERSION:-6} | ||
command: ./bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING | ||
environment: | ||
ZSERVER_HOST: 0.0.0.0 | ||
ZSERVER_PORT: 55001 | ||
ADDONS: 'plone.app.robotframework==2.0.0' | ||
APPLY_PROFILES: plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage | ||
CONFIGURE_PACKAGES: plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors | ||
ports: | ||
- 55001:55001 | ||
profiles: | ||
- dev | ||
- prod |
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,9 @@ | ||
const { defineConfig } = require('cypress'); | ||
|
||
module.exports = defineConfig({ | ||
viewportWidth: 1280, | ||
e2e: { | ||
baseUrl: 'http://localhost:3000', | ||
specPattern: 'cypress/tests/*.cy.{js,jsx}', | ||
}, | ||
}); |
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.