Skip to content

Commit

Permalink
Merge branch 'develop' into 'master' for 0.16.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
shauke committed Nov 29, 2019
2 parents 03fbdb7 + d788436 commit 7e93f10
Show file tree
Hide file tree
Showing 584 changed files with 9,181 additions and 7,607 deletions.
5 changes: 2 additions & 3 deletions .createMockdata.table
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ categories ?imageView=NO-IMAGE&limit=2&view=tree
categories/Cameras-Camcorders
categories/Cameras-Camcorders/575
categories/Cameras-Camcorders/products ?amount=9&attrs=sku,salePrice,listPrice,availability,manufacturer,image,minOrderQuantity,inStock,promotions,packingUnit,mastered,productMaster,productMasterSKU,roundedAverageRating&attrsGroups=PRODUCT_LABEL_ATTRIBUTES&offset=0&returnSortKeys=true&productFilter=fallback_searchquerydefinition
categories/Cameras-Camcorders/584
categories/Cameras-Camcorders/584/products ?amount=9&attrs=sku,salePrice,listPrice,availability,manufacturer,image,minOrderQuantity,inStock,promotions,packingUnit,mastered,productMaster,productMasterSKU,roundedAverageRating&attrsGroups=PRODUCT_LABEL_ATTRIBUTES&offset=0&returnSortKeys=true&productFilter=fallback_searchquerydefinition {elements:[.elements[]|select(.uri|test(".*/(3953312|4729528)"))],name,type,sortKeys}
categories/Home-Entertainment/SmartHome
categories/Home-Entertainment/SmartHome/products ?amount=9&attrs=sku,salePrice,listPrice,availability,manufacturer,image,minOrderQuantity,inStock,promotions,packingUnit,mastered,productMaster,productMasterSKU,roundedAverageRating&attrsGroups=PRODUCT_LABEL_ATTRIBUTES&offset=0&returnSortKeys=true&productFilter=fallback_searchquerydefinition {elements:[.elements[]|select(.uri|test(".*/(201807171|201807191)"))],name,type,sortKeys}
categories/Cameras-Camcorders/832
categories/Cameras-Camcorders/832/products ?amount=9&attrs=sku,salePrice,listPrice,availability,manufacturer,image,minOrderQuantity,inStock,promotions,packingUnit,mastered,productMaster,productMasterSKU,roundedAverageRating&attrsGroups=PRODUCT_LABEL_ATTRIBUTES&offset=0&returnSortKeys=true&productFilter=fallback_searchquerydefinition {elements:[.elements[]|select(.uri|test(".*/(8182790134362|8182790134363)"))],name,type,sortKeys}
categories/Computers
Expand All @@ -28,7 +28,6 @@ categories/Computers/106/236
categories/Computers/106/830
categories/Home-Entertainment
categories/Specials
products/3953312 ?allImages=true .images|=sort_by(.name)|.shippingMethods|=sort_by(.name)
products/4729528 ?allImages=true .images|=sort_by(.name)|.shippingMethods|=sort_by(.name)
products/7912057 ?allImages=true .images|=sort_by(.name)|.shippingMethods|=sort_by(.name)
products/201807171 ?allImages=true .images|=sort_by(.name)|.shippingMethods|=sort_by(.name)
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: TestCI

on: [push]

jobs:
quality:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12

- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-quality-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-quality-npm-
- uses: actions/cache@v1
with:
path: ~/.cache
key: ${{ runner.os }}-quality-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-quality-cache-
- name: Install Packages
run: |
npm ci
cd e2e
npm ci
- name: Code Quality
run: |
npm run format
bash scripts/ci-test-no-changes.sh 'you probably committed unformatted code'
- name: Compile
run: |
npm run ng -- build --aot
npx tsc -p tsconfig.spec.json
(cd e2e && npx tsc -p cypress/tsconfig.json)
(cd schematics && npm run build && bash ../scripts/ci-test-no-changes.sh 'you probably committed unformatted code')
(cd tslint-rules && npm run build && bash ../scripts/ci-test-no-changes.sh 'you probably committed unformatted code')
- name: Lint by action
uses: mooyoul/tslint-actions@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
project: 'tsconfig.json'

tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12

- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-test-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-test-npm-
- uses: actions/cache@v1
with:
path: ~/.cache
key: ${{ runner.os }}-test-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-test-cache-
- name: Install Packages
run: |
npm i -g wait-on
npm ci
cd e2e
npm ci
- name: Test Jest
run: |
npm test
- name: Test E2E mocked
run: |
npm run ng -- serve &
wait-on http://localhost:4200
cd e2e
node cypress-ci-e2e **/*mock*.e2e-spec.ts
env:
CI: true
PWA_BASE_URL: http://localhost:4200
ICM_BASE_URL: http://localhost:4200

- name: Upload results as an artifact
if: failure()
uses: actions/upload-artifact@master
with:
name: 'screenshots'
path: './e2e/cypress/screenshots'
78 changes: 66 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cancel_old_pipelines:
- echo "cancel complete"

setup:
image: node:10
image: node:12
stage: setup
only:
- merge_requests
Expand All @@ -45,19 +45,22 @@ setup:
script:
- node --version && npm --version
- bash -c "cd tslint-rules ; npm --silent run build"
- bash .gitlab-ci-test-no-changes.sh 'you probably did not commit compiled binaries in tslint-rules'
- bash scripts/ci-test-no-changes.sh 'you probably did not commit compiled binaries in tslint-rules'
- bash -c "cd schematics ; npm --silent run build"
- bash .gitlab-ci-test-no-changes.sh 'you probably did not commit compiled binaries in schematics'
- bash scripts/ci-test-no-changes.sh 'you probably did not commit compiled binaries in schematics'
- npm i && npm i
- bash .gitlab-ci-test-no-changes.sh 'you probably did not commit package-lock.json correctly after installing packages, run npm i again'
- bash scripts/ci-test-no-changes.sh 'you probably did not commit package-lock.json correctly after installing packages, run npm i again'
- echo "setup complete"

start_review_server:
cache: {}
dependencies: []
stage: setup
only:
- merge_requests
refs:
- merge_requests
- develop
- master
tags:
- shell-executor
- docker
Expand All @@ -77,7 +80,7 @@ start_review_server:
url: http://$DEMO_SERVER_NAME:3000

jest_test:
image: node:10
image: node:12
stage: build
only:
- merge_requests
Expand All @@ -102,7 +105,7 @@ jest_test:
- echo "build complete"

compile:
image: node:10
image: node:12
stage: build
only:
- merge_requests
Expand All @@ -123,7 +126,7 @@ compile:
- echo "build complete"

code_quality:
image: node:10
image: node:12
stage: build
only:
refs:
Expand All @@ -139,7 +142,7 @@ code_quality:
script:
- npm ci --prefer-offline
- npm run format
- bash .gitlab-ci-test-no-changes.sh 'you probably committed unformatted code'
- bash scripts/ci-test-no-changes.sh 'you probably committed unformatted code'
- node reports/tslint-gitlab
- echo "build complete"

Expand Down Expand Up @@ -202,6 +205,7 @@ publish_pwa:
refs:
- develop
- master
- demo
- tags
- merge_requests
tags:
Expand Down Expand Up @@ -253,6 +257,7 @@ publish_nginx:
refs:
- develop
- master
- demo
- tags
- merge_requests
changes:
Expand Down Expand Up @@ -423,6 +428,23 @@ deploy_demo_BO:
name: BackOffice
url: $BO_URL

deploy_demo_MAIL:
stage: deploy
cache: {}
dependencies: []
tags:
- shell-executor
only:
- merge_requests
- develop
variables:
GIT_STRATEGY: none
script:
- echo "done"
environment:
name: MailServer
url: $MAILSERVER_URL

deploy_reports:
stage: deploy
cache: {}
Expand Down Expand Up @@ -623,8 +645,40 @@ build_e2e_image:
- test -z "${CI_JOB_TOKEN}" || docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- test -z "${CI_JOB_TOKEN}" || docker push ${CI_REGISTRY_IMAGE}:e2e-${CI_COMMIT_REF_SLUG}-${CI_BUILD_REF}

deploy_public_demo:
stage: deploy
cache: {}
dependencies: []
tags:
- shell-executor
only:
- demo
variables:
GIT_STRATEGY: none
script:
- echo "done"
environment:
name: Public Deployment
url: $PUBLIC_DEMO_URL

deploy_public_BO:
stage: deploy
cache: {}
dependencies: []
tags:
- shell-executor
only:
- demo
variables:
GIT_STRATEGY: none
script:
- echo "done"
environment:
name: Public Deployment BackOffice
url: $PUBLIC_BO_URL

schematics:
image: node:10
image: node:12
stage: e2e
retry: 1
only:
Expand Down Expand Up @@ -744,7 +798,7 @@ check_mr_title:
check_tslint_no_warnings:
cache: {}
dependencies: []
image: node:10
image: node:12
stage: verify
only:
- merge_requests
Expand All @@ -753,7 +807,7 @@ check_tslint_no_warnings:
- performance
script:
- npm ci
- sh .gitlab-ci-check-no-additional-warnings.sh
- sh scripts/ci-check-no-additional-warnings.sh
- echo "check complete"

housekeeping_images:
Expand Down
3 changes: 2 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": [
"stylelint-config-standard",
"stylelint-config-recommended-scss",
"stylelint-config-recess-order"
"stylelint-config-recess-order",
"stylelint-prettier/recommended"
],
"rules": {
"at-rule-no-vendor-prefix": true,
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// code style + formatting
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"shinnn.stylelint",
"hex-ci.stylelint-plus",
"ms-vscode.vscode-typescript-tslint-plugin",
// testing
"orta.vscode-jest",
Expand Down
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
{
"editor.renderWhitespace": "all",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.tslint": true
},
"tslint.alwaysShowRuleFailuresAsWarnings": true,

// file type specific exclusions
// file type specific settings
"[handlebars]": {
"editor.formatOnSave": false
},

"files.associations": {
"__*.*": "ng-template"
},

"ngschematics.schematics": ["intershop-schematics"],
"workbench.iconTheme": "vscode-icons",
"prettier.tslintIntegration": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
Loading

0 comments on commit 7e93f10

Please sign in to comment.