Skip to content

Commit

Permalink
ci(module:angular): add angular ci (ant-design#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell Hu committed Sep 26, 2020
1 parent 43e4933 commit 0485311
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ references:
requires:
- setup
- icons-svg
- icons-angular:
requires:
- setup
- icons-svg

jobs:
setup:
Expand Down Expand Up @@ -67,6 +71,13 @@ jobs:
- checkout
- *attach_workspace
- run: yarn react:ci

icons-angular:
<<: *container_config
steps:
- checkout
- *attach_workspace
- run: yarn angular:ci

workflows:
version: 2
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"icons:build": "lerna run --scope @ant-design/icons-svg build",
"icons:test": "lerna run --scope @ant-design/icons-svg test",
"react:ci": "lerna run --scope @ant-design/icons ci",
"angular:ci": "lerna run --scope @ant-design/icons-angular-workspace ci",
"lint": "lerna run lint"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions packages/icons-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"ng": "ng",
"start": "ng serve",
"lint": "ng lint",
"test": "ng test --watch=true",
"test": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI --code-coverage",
"build": "ng build --prod",
"build:lib": "npm run generate && ng build ant-design-icons-angular --prod && npm run copy:assets",
"generate": "cross-env TS_NODE_PROJECT=scripts/tsconfig.json node --require ts-node/register scripts/generate.ts",
"copy:assets": "cross-env node --require ts-node/register scripts/copy.ts"
"copy:assets": "cross-env node --require ts-node/register scripts/copy.ts",
"ci": "npm run build:lib"
},
"license": "MIT",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/icons-angular/src/component/icon.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ export class IconDirective implements OnChanges {
const children = el.childNodes;
const length = children.length;
for (let i = length - 1; i >= 0; i--) {
const child = children[ i ] as HTMLElement;
if (child.tagName.toLowerCase() === 'svg') {
const child = children[ i ] as any;
if (child.tagName?.toLowerCase() === 'svg') {
this._renderer.removeChild(el, child);
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/icons-angular/src/component/icon.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ describe('@ant-design/icons-angular', () => {
}, 50);
});
});

});

@Component({
Expand Down
6 changes: 6 additions & 0 deletions packages/icons-angular/src/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ module.exports = function (config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
singleRun: false,
browserNoActivityTimeout: 1000 * 60 // (Default: 10000)
});
Expand Down

0 comments on commit 0485311

Please sign in to comment.