Skip to content

Commit e8822ac

Browse files
authored
feat(build): full lifecycle update before v7 (#6040)
* nx: hide root * nx: drop in nx template * ngx: dropped megabundle * nx: generator init * nx: generate all libs * ngx: add utils * npm: add husky * ngx: added typeahead * ngx: added accordion and fixed typeahead * ngx: add alert * ngx: add buttons * git: remove dist * ngx: carousel * ngx: added chronos * ngx: datepicker tooltip mini-ngrx * ngx: dropdown * ngx: add locale * ngx: modal * ngx: add pagination * ngx: add popover * ngx: progressbar * ngx: rating * ngx: sortable * ngx: tabs * ngx: timepicker * nx: dep tree * git: rm old package lock * ga: firebase preview * ngx: remove forRoot() * ga: firebase deploy * nx: enable nx cloud * nx: fix lint * nx: build and serve * ngx: organize spec files * ngx: removed not-recommended section * cy: in progress * ci: run cy * cy: moved to nxcloud * ci: cy record * ng: add outputs * ci: run cy in parallel * ci: e2e matrix * ci: comment lint & test * ci: cy auto build id * ci: cy matrix 5 * ci: cache node_modules * ci: split jobs properly * git: hide old artifacts * ci: deploy static * ci: cache cypress binary * docs: fix import * npm: fix deps * build: serve scully with confidence * npm: set-version script udpated * ci: gh-pages release * ci: remove @latest versions * ngx: added ngx-bootstrap root folder * npm: prepare for publish * ngx: add project for schematics * docs: remove forms dep * test: fix test runner * gh-pages: continue on error * ci: on pull, on push and on release * ci: verify cypres * ci: cypress cache * nx: verbose and cypress cache * ci: new hash for commit * npm: bump deps versions * ci: simple cache path * ci: codecoverage + codecov * ci: split unit tests and linting * update: todo list * ci: cypress key in env * ci: use fork ready github action * ci: run local cypress if token is not set * ci: secrets issue * ci: secrets issue N2 * ci: secrets issue N3 * ci: disable cypress verify and use step output properly * ci: firebase env variable? * ci: check on push to dev * ci: skip ui build for CI cypress * ci: remove scully for now, and don't run on-push to nx-workspace * ci: rerun branch push * firebase: deploy without scully fixed
1 parent 6e200b5 commit e8822ac

File tree

1,383 files changed

+21942
-23657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,383 files changed

+21942
-23657
lines changed

.angular-cli.json.bak

-94
This file was deleted.

.editorconfig

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# https://editorconfig.org
2-
1+
# Editor configuration, see http://editorconfig.org
32
root = true
43

54
[*]
65
charset = utf-8
76
indent_style = space
87
indent_size = 2
9-
end_of_line = lf
108
insert_final_newline = true
119
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintrc.json

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nrwl/nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nrwl/nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] }
16+
]
17+
}
18+
]
19+
}
20+
},
21+
{
22+
"files": ["*.ts", "*.tsx"],
23+
"extends": ["plugin:@nrwl/nx/typescript"],
24+
"parserOptions": { "project": "./tsconfig.*?.json" },
25+
"rules": {}
26+
},
27+
{
28+
"files": ["*.js", "*.jsx"],
29+
"extends": ["plugin:@nrwl/nx/javascript"],
30+
"rules": {}
31+
}
32+
]
33+
}

.github/workflows/on-pull-request.yml

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
name: on-pull-request
2+
on: pull_request
3+
4+
env:
5+
NX_BRANCH: ${{ github.event.number }}
6+
NX_RUN_GROUP: ${{ github.run_id }}
7+
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
8+
MOZ_HEALESS: 1
9+
SAUCE_USERNAME_PR: valorkinpr
10+
SAUCE_ACCESS_KEY_PR: e0a97bd3-4b74-4408-89bf-cce1b44a8bf1
11+
CYPRESS_CACHE_FOLDER: 'node_modules/.cypress'
12+
CYPRESS_RECORD_KEY: 4aa7a1c0-3a4f-444e-b324-6fc305a543a8
13+
14+
jobs:
15+
build_and_cache:
16+
runs-on: ubuntu-latest
17+
steps:
18+
# checkout
19+
- uses: actions/[email protected]
20+
# start: npm ci && build
21+
- uses: actions/[email protected]
22+
id: cache-build
23+
with:
24+
path: |
25+
~/.npm
26+
node_modules
27+
dist
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
30+
- run: npm ci
31+
if: steps.cache-build.outputs.cache-hit != 'true'
32+
33+
# end: npm ci && build
34+
- run: |
35+
npx ng build --runner cloud --prod --with-deps
36+
npx nx run ngx-bootstrap:build-sass --runner cloud
37+
38+
unit_tests_with_coverage:
39+
runs-on: ubuntu-latest
40+
needs: build_and_cache
41+
steps:
42+
- uses: actions/[email protected]
43+
44+
# start: npm ci && build
45+
- uses: actions/[email protected]
46+
id: cache-build
47+
with:
48+
path: |
49+
~/.npm
50+
node_modules
51+
dist
52+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
53+
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
54+
- name: npm ci && npm run build --prod
55+
if: steps.cache-build.outputs.cache-hit != 'true'
56+
run: |
57+
npm ci
58+
npx ng build --runner cloud --prod --with-deps
59+
npx nx run ngx-bootstrap:build-sass --runner cloud
60+
# end: npm ci && build
61+
62+
- run: npm test -- --runner cloud --codeCoverage
63+
continue-on-error: true
64+
- run: npx codecov ./coverage/
65+
continue-on-error: true
66+
67+
linting:
68+
runs-on: ubuntu-latest
69+
needs: build_and_cache
70+
steps:
71+
- uses: actions/[email protected]
72+
73+
# start: npm ci && build
74+
- uses: actions/[email protected]
75+
id: cache-build
76+
with:
77+
path: |
78+
~/.npm
79+
node_modules
80+
dist
81+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
82+
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
83+
- name: npm ci && npm run build --prod
84+
if: steps.cache-build.outputs.cache-hit != 'true'
85+
run: |
86+
npm ci
87+
npx ng build --runner cloud --prod --with-deps
88+
npx nx run ngx-bootstrap:build-sass --runner cloud
89+
# end: npm ci && build
90+
- run: npm run lint -- --runner cloud
91+
continue-on-error: true
92+
93+
firebase_preview:
94+
runs-on: ubuntu-latest
95+
needs: build_and_cache
96+
outputs:
97+
output_url: ${{ steps.firebase_hosting_preview.outputs.details_url }}
98+
steps:
99+
- uses: actions/[email protected]
100+
101+
# start: npm ci && build
102+
- uses: actions/[email protected]
103+
id: cache-build
104+
with:
105+
path: |
106+
~/.npm
107+
node_modules
108+
dist
109+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
110+
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
111+
- name: npm ci && npm run build --prod
112+
if: steps.cache-build.outputs.cache-hit != 'true'
113+
run: |
114+
npm ci
115+
npx ng build --runner cloud --prod --with-deps
116+
npx nx run ngx-bootstrap:build-sass --runner cloud
117+
# end: npm ci && build
118+
119+
# - run: npm run scully
120+
- uses: FirebaseExtended/action-hosting-deploy@v0
121+
continue-on-error: true
122+
id: firebase_hosting_preview
123+
with:
124+
repoToken: '${{ secrets.GITHUB_TOKEN }}'
125+
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_NGX_BOOTSTRAP_DEMO }}'
126+
projectId: ngx-bootstrap-demo
127+
expires: 30d
128+
env:
129+
FIREBASE_CLI_PREVIEWS: hostingchannels
130+
131+
e2e_smoke:
132+
name: Cypress run
133+
runs-on: ubuntu-latest
134+
needs: [build_and_cache, firebase_preview]
135+
136+
strategy:
137+
# when one test fails, DO NOT cancel the other
138+
# containers, because this will kill Cypress processes
139+
# leaving the Dashboard hanging ...
140+
# https://github.com/cypress-io/github-action/issues/48
141+
fail-fast: false
142+
matrix:
143+
# run 3 copies of the current job in parallel
144+
containers: [1, 2, 3, 4, 5]
145+
steps:
146+
- uses: actions/[email protected]
147+
148+
# start: npm ci && build
149+
- uses: actions/[email protected]
150+
id: cache-build
151+
with:
152+
path: |
153+
~/.npm
154+
node_modules
155+
dist
156+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
157+
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
158+
- name: npm ci && npm run build --prod
159+
if: steps.cache-build.outputs.cache-hit != 'true'
160+
run: |
161+
npm ci
162+
npx ng build --runner cloud --prod --with-deps
163+
npx nx run ngx-bootstrap:build-sass --runner cloud
164+
# end: npm ci && build
165+
166+
# because of "record" and "parallel" parameters
167+
# these containers will load balance all found tests among themselves
168+
- name: smoke e2e on firebase
169+
if: ${{ needs.firebase_preview.outputs.output_url }}
170+
continue-on-error: true
171+
run: npx nx run ci-docs-e2e:e2e --runner cloud --record --group smoke --baseUrl=${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/ -- --parallel
172+
173+
- name: smoke e2e local
174+
if: ${{ !needs.firebase_preview.outputs.output_url }}
175+
continue-on-error: true
176+
run: npx nx run ngx-bootstrap-docs-e2e:e2e --prod --runner cloud --record --group smoke -- --parallel
177+
178+

0 commit comments

Comments
 (0)