Code Monkey home page Code Monkey logo

volto-addon-ci's Introduction

Testing Volto Add-ons Docker Image

Docker Cloud Build Status

Docker Image optimized for running tests over Volto Add-ons

Supported tags and respective Dockerfile links

Base docker image

Source code

Simple Usage

$ docker run -it --rm \
             -e GIT_NAME=volto-group-block \
             -e GIT_BRANCH=develop \
             -e NAMESPACE=@eeacms \
             -e DEPENDENCIES="@eeacms/volto-blocks-form" \
         plone/volto-addon-ci eslint

Advanced Usage

$ docker run -it --rm \
             -e GIT_NAME=volto-group-block \
             -e GIT_CHANGE_ID=50 \
             -e GIT_BRANCH=PR-50 \
             -e NAMESPACE=@eeacms \
             -e DEPENDENCIES="@eeacms/volto-blocks-form" \
         plone/volto-addon-ci eslint

Local usage

$ cd src/addons/volto-slate

$ docker run -it --rm \
             -v $(pwd):/opt/frontend/my-volto-project/src/addons/volto-slate \
             -e GIT_NAME=volto-slate \
         plone/volto-addon-ci

Resolutions

Volto add-ons may depend on other JS libraries and/or other Volto add-ons. In order to enforce specific versions, you can use selective dependency resolutions within your add-on.

Troubleshooting

  1. Make sure your Volto project yarn.lock is not polluted. You can always reset your Volto project yarn.lock with:

     $ npm install -g @plone/generator-volto
     $ cd my-volto-project
     $ yo @plone/volto --skip-install --no-interactive /tmp/new-volto-project
     $ cp /tmp/new-volto-project/yarn.lock .
     $ yarn
    
  2. Add-on resolutions don't work with workspaces (development mode), thus you'll need to define resolutions within Volto project. To tackle this issue, this Docker image automatically extracts resolutions from add-on and add them also to the Volto project before running tests.

  3. See also

Supported environment variables

  • VOLTO Volto version that the project will use. Default: Latest released version is used.
  • TIMEOUT Timeout in ms (e.g.: TIMEOUT=60000). Default: 120000
  • GIT_NAME Git repo name (e.g.: GIT_NAME=volto-group-block). Required
  • GIT_URL Git repo root url (e.g.: GIT_URL=https://gitlab.com). Default https://github.com
  • GIT_BRANCH Run tests over the provided git branch (e.g.: GIT_BRANCH=develop). Default: master
  • GIT_USER Override git user (e.g.: GIT_USER=collective). Default: eea
  • GIT_CHANGE_ID Run tests over a github pull-request (e.g.: GIT_CHANGE_ID=PR-5. Default: <not-set>
  • NAMESPACE Volto add-on namespace (e.g.: NAMESPACE=@eeacms). Default: <not-set>
  • DEPENDENCIES Volto add-on dependencies space separated (e.g.: DEPENDENCIES=@eeacms/volto-blocks-form volto-slate). Default: <not-set>
  • RAZZLE_API_PATH Razzle API path (e.g.: RAZZLE_API_PATH=http://foo.bar:8080/plone). Default: http://plone:8080/Plone
  • CYPRESS_API_PATH Cypress API Path (e.g.: CYPRESS_API_PATH=http://foo.bar:8080/plone). Default: $RAZZLE_API_PATH

Supported commands

  • test Run jest Volto add-on unit tests (Default)
  • eslint Run eslint checks over Volto add-on code
  • stylelint Run stylelint checks over Volto add-on code
  • prettier Run prettier checks over Volto add-on code
  • cypress Run cypress checks over Volto add-on code

Copyright and license

The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.

The Original Code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Funding

European Environment Agency (EU)

volto-addon-ci's People

Contributors

avoinea avatar sneridagh avatar valentinab25 avatar nileshgulia1 avatar tiberiuichim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.