Skip to content
This repository has been archived by the owner on Nov 23, 2022. It is now read-only.

Commit

Permalink
feat: upgrade to volto16 (#605)
Browse files Browse the repository at this point in the history
* chore: upgraded volto to 16 alpha 45

* chore: upgrades for volto16

* chore: upgraded mrs-developer

* chore: upgrade dependencies

* refactor: upgrade razzle config for razzle 4

* feat: added layout views i18n names

* chore: removed passwordreset view backport

* refactor: removed mrs-developer, deprecated @italia

* chore: removed routes backports

* chore: re-added our custom Image component

* fix: config and sass dependencies

* chore: updated locales

* fix: styles after sass upgrade

* chore: upgrade dependencies

* chore: added test deployment config

* fix: dockerfile

* fix: cleanup rendering warnings

* fix: workaround nested bootstrap/reboot

* chore: bundlewatch removed

* chore: volto16 update actions

* fix: print styles compilation that broke reboot compilation

* fix: test config

* fix: tests

* chore: customizationPaths

* chore: bundle_size action

* chore: remove duplicated action

* chore: actions cleanup

* fix: invalid comment

* fix: view responsive image in gallery

* fix: image intersectionobserver

* fix: img responsive

* fix: intersection observer simplified

* chore: dockerfile + dockercompose

* feat!: update volto

* feat: node 16 / yarn 3

* ci: yarn 3

* ci: make

* ci: yarn 3

* ci

* ci: dockerfile

* ci: dockerfile

* ci: bundlesize

* docs: docker compose update

* feat: slick font removed

* fix: missing image styles from plone/volto#2103

* chore: upgrade to volto 16.0.0

* build: upgraded docker base image to bullseye, cleaned up env vars

* chore: removed old i18n pre-commit hook

* build: use yarn 3

* build: commit hooks dependencies

Co-authored-by: mamico <[email protected]>
  • Loading branch information
pnicolli and mamico authored Nov 23, 2022
1 parent ef2e748 commit e6be34d
Show file tree
Hide file tree
Showing 417 changed files with 27,199 additions and 21,033 deletions.
34 changes: 18 additions & 16 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
.vscode/
logs
*.log
npm-debug.log*
.DS_Store

coverage
node_modules
build
src/addons
.env.local
.env.development.local
.env.test.local
.env.production.local

cache
coverage
data
omelette
docker-compose.yml
docker-compose.*
Dockerfile
.DS_Store
.env.development.local
.env.local
.env.production.local
.env.test.local
.git
.gitignore
.history
locales/*.json
*.log
logs
node_modules
npm-debug.log*
omelette
.vscode/
.yarn/
.yarnrc
13 changes: 12 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const addonsAliases = [];
if (packageJson.addons) {
const addons = packageJson.addons;
addons.forEach((addon) => {
// TODO deprecated: remove in version 8
const addonPath = `@italia/addons/${addon}/src`;
addonsAliases.push([`@italia/addons/${addon}`, addonPath]);
});
Expand All @@ -20,7 +21,17 @@ module.exports = {
map: [
['@plone/volto', '@plone/volto/src'],
['@package', './src'],
['@italia', './src'],
['@italia', './src'], // TODO deprecated: remove in version 8
['design-volto-theme', './src'],
// TODO remove the next two when implemented in core
[
'@plone/volto/components/theme/Image/Image',
path.resolve(`${projectRootPath}/src/components/Image/Image.jsx`),
],
[
'@plone/volto/helpers/Image/Image',
path.resolve(`${projectRootPath}/src/components/Image/helpers.js`),
],
...addonsAliases,
],
extensions: ['.js', '.jsx', '.json'],
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/bundle_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: develop
# ref: ${{ github.base_ref }}
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16

- name: Install dependencies
run: yarn --frozen-lockfile
run: yarn set version 3.2.3 && yarn --immutable
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}

Expand All @@ -45,17 +45,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
- name: Install dependencies
run: yarn --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}

- name: Dev requirements
run: yarn develop
run: yarn set version 3.2.3 && yarn --immutable
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}

Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/bundlewatch.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This is a basic workflow to help you get started with Actions
name: Docker build for latest develop version


Expand Down Expand Up @@ -36,7 +35,6 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build_develop:
# The type of runner that the job will run on
runs-on: ubuntu-latest
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/test.yml

This file was deleted.

31 changes: 13 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,26 @@ jobs:
timeout-minutes: 45
strategy:
matrix:
node-version: [14.x]
# node-version: [14.x, 16.x]
# node-version: [14.x]
node-version: [14.x, 16.x]
steps:
- 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
- run: yarn --frozen-lockfile
# node install
- run: yarn set version 3.2.3 && yarn --immutable

- name: Jest tests
run: yarn test

# Bundlewatch
# - run: yarn build
# - uses: jackyef/bundlewatch-gh-action@master
# with:
# bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/volto16.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docker build for new volto 16 version
on:
push:
branches: [upgrade_to_volto16]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
# List of tags
tags: redturtletech/io-comune-base:volto16
pull: true
# Push is a shorthand for --output=type=registry
push: true
builder: ${{ steps.buildx.outputs.name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Deploy to rancher
uses: redturtle/[email protected]
with:
host: ${{ secrets.RANCHER_HOST }}
api-username: ${{ secrets.RANCHER_API_USERNAME }}
api-password: ${{ secrets.RANCHER_API_PASSWORD }}
cluster-id: ${{ secrets.RANCHER_CLUSTER_ID }}
project-id: ${{ secrets.RANCHER_PROJECT_ID }}
namespace: ${{ secrets.RANCHER_NAMESPACE_DEVELOP }}
workload: ${{ secrets.RANCHER_WORKLOAD_VOLTO16 }}
image: redturtletech/io-comune-base:volto16
slack-hook-url: ${{ secrets.RANCHER_SLACK_HOOK_URL }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.vscode/
.history
.yarn/
.yarnrc
logs
*.log
npm-debug.log*
Expand All @@ -11,10 +9,12 @@ src/addons
coverage
node_modules
build
cache
.env.local
.env.development.local
.env.test.local
.env.production.local
.yarn/install-state.gz

data
omelette
Expand Down
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit ${1}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/fermium
lts/gallium
Loading

0 comments on commit e6be34d

Please sign in to comment.