Skip to content

Commit

Permalink
Merge pull request #32 from eea/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
avoinea authored Sep 29, 2023
2 parents a9f8503 + 27fd752 commit 6d10e8e
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 49 deletions.
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[ -n "$CI" ] && exit 0
yarn lint-staged
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [5.1.4](https://github.com/eea/volto-widget-temporal-coverage/compare/5.1.3...5.1.4) - 29 September 2023

#### :house: Internal changes

- style: lint-staged reorder in package.json [Alin Voinea - [`5d576f9`](https://github.com/eea/volto-widget-temporal-coverage/commit/5d576f99cf783b6851ca6597d47e42a571fac94b)]

#### :house: Documentation changes

- docs: Update README and DEVELOP [Alin Voinea - [`84f9e61`](https://github.com/eea/volto-widget-temporal-coverage/commit/84f9e615626c5fe443711aabd4c79f128c392107)]

#### :hammer_and_wrench: Others

- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`27c7ed2`](https://github.com/eea/volto-widget-temporal-coverage/commit/27c7ed2c74c2e828ba9d0c22566e20631fc3405f)]
### [5.1.3](https://github.com/eea/volto-widget-temporal-coverage/compare/5.1.2...5.1.3) - 30 August 2023

#### :house: Internal changes
Expand Down
13 changes: 6 additions & 7 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@

1. Go to http://localhost:3000

1. Happy hacking!
1. Initialize git hooks

```Bash
cd src/addons/volto-widget-temporal-coverage/
yarn prepare
```

1. Happy hacking!

### Or add @eeacms/volto-widget-temporal-coverage to your Volto project

Before starting make sure your development environment is properly set. See [Volto Developer Documentation](https://docs.voltocms.com/getting-started/install/)
Expand All @@ -48,18 +50,15 @@ Before starting make sure your development environment is properly set. See [Vol

1. Install

yarn develop
make develop
yarn

1. Start backend

docker pull plone
docker run -d --name plone -p 8080:8080 -e SITE=Plone -e PROFILES="profile-plone.restapi:blocks" plone
docker run --pull always -it --rm --name plone -p 8080:8080 -e SITE=Plone plone/plone-backend

...wait for backend to setup and start - `Ready to handle requests`:

docker logs -f plone

...you can also check http://localhost:8080/Plone

1. Start frontend
Expand Down
66 changes: 45 additions & 21 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,17 @@ pipeline {

stage('Tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
}
}
}
}
Expand Down Expand Up @@ -110,11 +116,17 @@ pipeline {

stage('Integration tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
}
}
}
}
Expand Down Expand Up @@ -167,13 +179,19 @@ pipeline {

stage('Report to SonarQube') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
branch 'master'
allOf {
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
allOf {
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
}
branch 'master'
}
}
}
Expand All @@ -199,10 +217,16 @@ pipeline {

stage('SonarQube compare to master') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
}
steps {
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
[![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-widget-temporal-coverage-develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-widget-temporal-coverage-develop)
[![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-widget-temporal-coverage-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-widget-temporal-coverage-develop)

[Volto](https://github.com/plone/volto) add-on
[Volto](https://github.com/plone/volto) Widget: Temporal Coverage

## Features

![Widget Temporal coverage](https://raw.githubusercontent.com/eea/volto-widget-temporal-coverage/master/docs/volto-widget-temporal-coverage.gif)
![Widget Temporal coverage](https://github.com/eea/volto-widget-temporal-coverage/raw/master/docs/volto-widget-temporal-coverage.gif)

## Getting started

Expand All @@ -41,25 +41,25 @@ Go to http://localhost:3000

1. Start Volto frontend

- If you already have a volto project, just update `package.json`:
* If you already have a volto project, just update `package.json`:

```JSON
"addons": [
"@eeacms/volto-widget-temporal-coverage"
],
```JSON
"addons": [
"@eeacms/volto-widget-temporal-coverage"
],

"dependencies": {
"@eeacms/volto-widget-temporal-coverage": "*"
}
```
"dependencies": {
"@eeacms/volto-widget-temporal-coverage": "*"
}
```

- If not, create one:
* If not, create one:

```
npm install -g yo @plone/generator-volto
yo @plone/volto my-volto-project --canary --addon @eeacms/volto-widget-temporal-coverage
cd my-volto-project
```
```
npm install -g yo @plone/generator-volto
yo @plone/volto my-volto-project --canary --addon @eeacms/volto-widget-temporal-coverage
cd my-volto-project
```

1. Install new add-ons and restart Volto:

Expand Down
4 changes: 2 additions & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');

module.exports = defineConfig({
viewportWidth: 1280,
defaultCommandTimeout: 8888,
defaultCommandTimeout: 5000,
chromeWebSecurity: false,
reporter: 'junit',
video: true,
retries: {
runMode: 8,
runMode: 1,
openMode: 0,
},
reporterOptions: {
Expand Down
28 changes: 26 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-widget-temporal-coverage",
"version": "5.1.3",
"version": "5.1.4",
"description": "volto-widget-temporal-coverage: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand All @@ -20,8 +20,31 @@
"@cypress/code-coverage": "^3.10.0",
"@plone/scripts": "*",
"babel-plugin-transform-class-properties": "^6.24.1",
"husky": "*",
"lint-staged": "*",
"md5": "^2.3.0"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": [
"make lint-fix",
"make prettier-fix"
],
"src/**/*.{jsx}": [
"make i18n"
],
"theme/**/*.{css,less}": [
"make stylelint-fix"
],
"src/**/*.{css,less}": [
"make stylelint-fix"
],
"theme/**/*.overrides": [
"make stylelint-fix"
],
"src/**/*.overrides": [
"make stylelint-fix"
]
},
"scripts": {
"release": "release-it",
"release-major-beta": "release-it major --preRelease=beta",
Expand All @@ -39,6 +62,7 @@
"lint:fix": "make lint-fix",
"i18n": "make i18n",
"cypress:run": "make cypress-run",
"cypress:open": "make cypress-open"
"cypress:open": "make cypress-open",
"prepare": "husky install"
}
}

0 comments on commit 6d10e8e

Please sign in to comment.