-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1,383 changed files
with
21,942 additions
and
23,657 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# https://editorconfig.org | ||
|
||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["**/*"], | ||
"plugins": ["@nrwl/nx"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nrwl/nx/enforce-module-boundaries": [ | ||
"error", | ||
{ | ||
"enforceBuildableLibDependency": true, | ||
"allow": [], | ||
"depConstraints": [ | ||
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] } | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nrwl/nx/typescript"], | ||
"parserOptions": { "project": "./tsconfig.*?.json" }, | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nrwl/nx/javascript"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
name: on-pull-request | ||
on: pull_request | ||
|
||
env: | ||
NX_BRANCH: ${{ github.event.number }} | ||
NX_RUN_GROUP: ${{ github.run_id }} | ||
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }} | ||
MOZ_HEALESS: 1 | ||
SAUCE_USERNAME_PR: valorkinpr | ||
SAUCE_ACCESS_KEY_PR: e0a97bd3-4b74-4408-89bf-cce1b44a8bf1 | ||
CYPRESS_CACHE_FOLDER: 'node_modules/.cypress' | ||
CYPRESS_RECORD_KEY: 4aa7a1c0-3a4f-444e-b324-6fc305a543a8 | ||
|
||
jobs: | ||
build_and_cache: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# checkout | ||
- uses: actions/checkout@v2.3.4 | ||
# start: npm ci && build | ||
- uses: actions/cache@v2.1.4 | ||
id: cache-build | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
dist | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- run: npm ci | ||
if: steps.cache-build.outputs.cache-hit != 'true' | ||
|
||
# end: npm ci && build | ||
- run: | | ||
npx ng build --runner cloud --prod --with-deps | ||
npx nx run ngx-bootstrap:build-sass --runner cloud | ||
unit_tests_with_coverage: | ||
runs-on: ubuntu-latest | ||
needs: build_and_cache | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
|
||
# start: npm ci && build | ||
- uses: actions/cache@v2.1.4 | ||
id: cache-build | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
dist | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- name: npm ci && npm run build --prod | ||
if: steps.cache-build.outputs.cache-hit != 'true' | ||
run: | | ||
npm ci | ||
npx ng build --runner cloud --prod --with-deps | ||
npx nx run ngx-bootstrap:build-sass --runner cloud | ||
# end: npm ci && build | ||
|
||
- run: npm test -- --runner cloud --codeCoverage | ||
continue-on-error: true | ||
- run: npx codecov ./coverage/ | ||
continue-on-error: true | ||
|
||
linting: | ||
runs-on: ubuntu-latest | ||
needs: build_and_cache | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
|
||
# start: npm ci && build | ||
- uses: actions/cache@v2.1.4 | ||
id: cache-build | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
dist | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- name: npm ci && npm run build --prod | ||
if: steps.cache-build.outputs.cache-hit != 'true' | ||
run: | | ||
npm ci | ||
npx ng build --runner cloud --prod --with-deps | ||
npx nx run ngx-bootstrap:build-sass --runner cloud | ||
# end: npm ci && build | ||
- run: npm run lint -- --runner cloud | ||
continue-on-error: true | ||
|
||
firebase_preview: | ||
runs-on: ubuntu-latest | ||
needs: build_and_cache | ||
outputs: | ||
output_url: ${{ steps.firebase_hosting_preview.outputs.details_url }} | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
|
||
# start: npm ci && build | ||
- uses: actions/cache@v2.1.4 | ||
id: cache-build | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
dist | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- name: npm ci && npm run build --prod | ||
if: steps.cache-build.outputs.cache-hit != 'true' | ||
run: | | ||
npm ci | ||
npx ng build --runner cloud --prod --with-deps | ||
npx nx run ngx-bootstrap:build-sass --runner cloud | ||
# end: npm ci && build | ||
|
||
# - run: npm run scully | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
continue-on-error: true | ||
id: firebase_hosting_preview | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_NGX_BOOTSTRAP_DEMO }}' | ||
projectId: ngx-bootstrap-demo | ||
expires: 30d | ||
env: | ||
FIREBASE_CLI_PREVIEWS: hostingchannels | ||
|
||
e2e_smoke: | ||
name: Cypress run | ||
runs-on: ubuntu-latest | ||
needs: [build_and_cache, firebase_preview] | ||
|
||
strategy: | ||
# when one test fails, DO NOT cancel the other | ||
# containers, because this will kill Cypress processes | ||
# leaving the Dashboard hanging ... | ||
# https://github.com/cypress-io/github-action/issues/48 | ||
fail-fast: false | ||
matrix: | ||
# run 3 copies of the current job in parallel | ||
containers: [1, 2, 3, 4, 5] | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
|
||
# start: npm ci && build | ||
- uses: actions/cache@v2.1.4 | ||
id: cache-build | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
dist | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
- name: npm ci && npm run build --prod | ||
if: steps.cache-build.outputs.cache-hit != 'true' | ||
run: | | ||
npm ci | ||
npx ng build --runner cloud --prod --with-deps | ||
npx nx run ngx-bootstrap:build-sass --runner cloud | ||
# end: npm ci && build | ||
|
||
# because of "record" and "parallel" parameters | ||
# these containers will load balance all found tests among themselves | ||
- name: smoke e2e on firebase | ||
if: ${{ needs.firebase_preview.outputs.output_url }} | ||
continue-on-error: true | ||
run: npx nx run ci-docs-e2e:e2e --runner cloud --record --group smoke --baseUrl=${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/ -- --parallel | ||
|
||
- name: smoke e2e local | ||
if: ${{ !needs.firebase_preview.outputs.output_url }} | ||
continue-on-error: true | ||
run: npx nx run ngx-bootstrap-docs-e2e:e2e --prod --runner cloud --record --group smoke -- --parallel | ||
|
||
|
Oops, something went wrong.