|
@ -5,30 +5,10 @@ node_js: |
|
|
env: |
|
|
env: |
|
|
- WEBPACK_VERSION= # Current, from package.json |
|
|
- WEBPACK_VERSION= # Current, from package.json |
|
|
- WEBPACK_VERSION=4 |
|
|
- WEBPACK_VERSION=4 |
|
|
install: |
|
|
|
|
|
# Use npm 5.7.x since it has introduced `npm ci` |
|
|
|
|
|
- if [[ `npm -v` != 5.7* ]]; then npm install -g npm@'>=5.7.1'; fi |
|
|
|
|
|
- npm ci |
|
|
|
|
|
|
|
|
|
|
|
before_script: |
|
|
before_script: |
|
|
- if [[ -n "$WEBPACK_VERSION" ]]; then npm install --no-save webpack@$WEBPACK_VERSION; fi |
|
|
- if [[ -n "$WEBPACK_VERSION" ]]; then npm install --no-save webpack@$WEBPACK_VERSION; fi |
|
|
stages: |
|
|
|
|
|
- lint |
|
|
|
|
|
- test |
|
|
|
|
|
- build |
|
|
|
|
|
jobs: |
|
|
|
|
|
include: |
|
|
|
|
|
- stage: lint |
|
|
|
|
|
script: |
|
|
|
|
|
# Run linter |
|
|
|
|
|
- npm run lint |
|
|
|
|
|
- stage: test |
|
|
|
|
|
script: |
|
|
|
|
|
# Run tests |
|
|
|
|
|
- npm run test |
|
|
|
|
|
- stage: build |
|
|
|
|
|
script: |
|
|
|
|
|
# Build all |
|
|
|
|
|
- npm run build |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
branches: |
|
|
branches: |
|
|
only: |
|
|
only: |
|
|