Skip to content

Commit

Permalink
Merge branch 'develop' into 'master' for 0.18.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
suschneider committed Mar 9, 2020
2 parents 4888b7f + 1a7c27f commit 41d9d2e
Show file tree
Hide file tree
Showing 396 changed files with 12,218 additions and 4,202 deletions.
50 changes: 41 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@ name: TestCI
on: [push]

jobs:
CancelPrevious:
runs-on: ubuntu-latest

steps:
- name: Cancel Old Pipeline
uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Quality:
runs-on: ubuntu-16.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
Expand All @@ -23,6 +32,11 @@ jobs:
- name: Install root dependencies
uses: bahmutov/npm-install@v1

- name: Install e2e dependencies
uses: bahmutov/npm-install@v1
with:
working-directory: e2e

- name: Code Quality
run: |
npm run format
Expand All @@ -32,17 +46,22 @@ jobs:
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: Escalate TSLint Rules
run: |
node scripts/tslint-hard
- name: Lint by action
uses: mooyoul/tslint-actions@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
project: 'tsconfig.json'

Jest:
runs-on: ubuntu-16.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
Expand All @@ -59,7 +78,7 @@ jobs:
npm test
Build:
runs-on: ubuntu-16.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -97,7 +116,7 @@ jobs:

Schematics:
needs: [Build, Quality, Jest]
runs-on: ubuntu-16.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
Expand All @@ -112,14 +131,16 @@ jobs:
- name: Test Schematics
run: |
bash e2e/test-schematics.sh
sh scripts/ci-check-no-additional-warnings.sh
node scripts/tslint-hard
npm run lint
Cypress:
needs: Build
runs-on: ubuntu-16.04
runs-on: ubuntu-latest

strategy:
fail-fast: false
fail-fast: true
max-parallel: 2
matrix:
test:
[
Expand All @@ -128,6 +149,8 @@ jobs:
'account/*b2c*',
'checkout/*b2c*',
'shopping/*b2c*',
'system/*b2c*',
'extras/*b2c*',
# TODO: include remaining in a general way
# '!(shopping|account|checkout)*/*b2c*'
# '@(cms|contact)*/*b2c*'
Expand All @@ -147,10 +170,19 @@ jobs:
with:
name: dist

- name: Start SSR
if: matrix.test != '*mock*'
run: |
npm run serve &
- name: Start Dev-Server
if: matrix.test == '*mock*'
run: |
npm run ng -- serve &
- name: Cypress
uses: cypress-io/github-action@master
uses: cypress-io/github-action@v1.22.0
with:
start: ${{ matrix.test == '*mock*' && 'npm run ng -- serve' || 'npm run serve > /dev/null 2>&1' }}
wait-on: 'http://localhost:4200'
wait-on-timeout: 180
working-directory: e2e
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci-get-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ -z "$1" ] && echo "instance name required" && exit 1
internalPort="${2:-4200}"

currentPort="$(docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}}{{(index $conf 0).HostPort}}{{end}}' "$1")"
currentPort="$(docker inspect --format='{{(index (index .NetworkSettings.Ports "$internalPort/tcp") 0).HostPort}}' "$1")"

if [ -z "$currentPort" ]
then
Expand Down
20 changes: 11 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ migration:
- merge_requests
except:
refs:
- develop
- github-develop
- master
tags:
- docker-executor
Expand Down Expand Up @@ -379,6 +379,7 @@ deploy_demo_b2b:
--name ${SERVICE}
--env ICM_BASE_URL=$ICM_BASE_URL
--env LOGGING=true
--env THEME="blue|688dc3"
--env FEATURES=quoting,compare,recently,businessCustomerRegistration,advancedVariationHandling,sentry
--env ICM_CHANNEL=inSPIRED-inTRONICS_Business-Site
--env SENTRY_DSN=${SENTRY_DSN}
Expand Down Expand Up @@ -410,7 +411,6 @@ deploy_demo_nginx:
--detach
--publish 4326:80
--name "${SERVICE}"
-e UPSTREAM_ICM=${ICM_BASE_URL}
-e UPSTREAM_PWA=http://$DEMO_SERVER_NAME:4321
-e PWA_1_SUBDOMAIN=b2c
-e PWA_1_CHANNEL=inSPIRED-inTRONICS-Site
Expand Down Expand Up @@ -535,7 +535,7 @@ deploy_review_b2c:
${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG}-${CI_BUILD_REF}
- PUBLISH_NGINX=$(sh .gitlab-ci-get-publish.sh "${CI_COMMIT_REF_SLUG}-nginx" 80)
- docker rm -f "${CI_COMMIT_REF_SLUG}-nginx" || true
- docker pull ${CI_REGISTRY_IMAGE}:nginx-${CI_COMMIT_REF_SLUG} || (docker pull ${CI_REGISTRY_IMAGE}:nginx-develop && docker tag ${CI_REGISTRY_IMAGE}:nginx-develop ${CI_REGISTRY_IMAGE}:nginx-${CI_COMMIT_REF_SLUG})
- docker pull ${CI_REGISTRY_IMAGE}:nginx-${CI_COMMIT_REF_SLUG} || (docker pull ${CI_REGISTRY_IMAGE}:nginx-github-develop && docker tag ${CI_REGISTRY_IMAGE}:nginx-github-develop ${CI_REGISTRY_IMAGE}:nginx-${CI_COMMIT_REF_SLUG})
- docker run
--detach
$PUBLISH_NGINX
Expand All @@ -547,7 +547,7 @@ deploy_review_b2c:
-e PWA_2_SUBDOMAIN=b2b
-e PWA_2_CHANNEL=inSPIRED-inTRONICS_Business-Site
-e PWA_2_FEATURES=quoting,recently,compare,businessCustomerRegistration,advancedVariationHandling,sentry
-e PWA_2_THEME=blue
-e PWA_2_THEME="blue|688dc3"
-e PWA_3_SUBDOMAIN=de
-e PWA_3_CHANNEL=inSPIRED-inTRONICS-Site
-e PWA_3_LANG=de_DE
Expand All @@ -556,7 +556,7 @@ deploy_review_b2c:
-e PWA_4_CHANNEL=inSPIRED-inTRONICS-Site
-e PWA_4_APPLICATION=smb-responsive
-e PWA_4_FEATURES=quoting
-e PWA_4_THEME=blue
-e PWA_4_THEME="blue|688dc3"
${CI_REGISTRY_IMAGE}:nginx-${CI_COMMIT_REF_SLUG}
- sleep 10
- docker run --rm --add-host $DEMO_SERVER_NAME:$DEMO_SERVER_IP mwendler/wget --wait 10 --tries 10 --retry-connrefused "http://$DEMO_SERVER_NAME:3000/${CI_COMMIT_REF_SLUG}-pwa-b2c"
Expand Down Expand Up @@ -614,7 +614,7 @@ deploy_review_b2b:
-e LOGGING=true
-e SENTRY_DSN=${SENTRY_DSN}
-e ICM_BASE_URL=${ICM_BASE_URL}
-e THEME=blue
-e THEME="blue|688dc3"
-e ICM_CHANNEL=inSPIRED-inTRONICS_Business-Site
-e FEATURES=quoting,recently,compare,businessCustomerRegistration,advancedVariationHandling,sentry
--add-host $ICM_HOST:$ICM_IP
Expand Down Expand Up @@ -717,7 +717,8 @@ schematics:
script:
- npm install
- bash e2e/test-schematics.sh
- sh scripts/ci-check-no-additional-warnings.sh
- node scripts/tslint-hard
- npm run lint
- echo "schematics complete"

.universal_template: &universal_definition
Expand Down Expand Up @@ -779,7 +780,7 @@ universal_b2b:

cypress_remote:
<<: *cypress_definition
parallel: 7
parallel: 9
only:
- merge_requests
- triggers
Expand Down Expand Up @@ -831,7 +832,8 @@ check_tslint_no_warnings:
- performance
script:
- npm ci
- sh scripts/ci-check-no-additional-warnings.sh
- node scripts/tslint-hard
- npm run lint
- echo "check complete"

housekeeping_images:
Expand Down
7 changes: 2 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
"angular.ng-template",
"mikael.angular-beastcode",
"formulahendry.auto-rename-tag",
"stringham.move-ts",
// code style + formatting
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"hex-ci.stylelint-plus",
"ms-vscode.vscode-typescript-tslint-plugin",
// testing
"orta.vscode-jest",
"andys8.jest-snippets",
"asvetliakov.snapshot-tools"
"andys8.jest-snippets"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
"unwantedRecommendations": ["eg2.tslint"]
}
Loading

0 comments on commit 41d9d2e

Please sign in to comment.