Skip to content

Commit

Permalink
Merge branch 'development' of github.com:valor-software/ngx-bootstrap…
Browse files Browse the repository at this point in the history
… into development
  • Loading branch information
daniloff200 committed Jul 29, 2021
2 parents 7b915d6 + c0beddb commit ab0e5fa
Show file tree
Hide file tree
Showing 2,121 changed files with 49,977 additions and 40,397 deletions.
94 changes: 0 additions & 94 deletions .angular-cli.json.bak

This file was deleted.

8 changes: 5 additions & 3 deletions .editorconfig
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
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"rules": {
},
"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": {
"semi": "off",
"@typescript-eslint/semi": ["error"]
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
}
]
}
193 changes: 193 additions & 0 deletions .github/workflows/on-push-or-pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
name: on-pull-request-or-push

on:
pull_request:
push:
branches:
- development

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
FIREBASE_CHANNEL: ${{ fromJSON('["", "live"]')[!github.base_ref] }}

CACHE_NODE_MODULES_PATH: |
~/.npm
node_modules
node_modules/ngx-bootstrap
CACHE_DIST_PATH: |
dist
node_modules/ngx-bootstrap
jobs:
# one run
one_run:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

# install dependencies
install:
runs-on: ubuntu-latest
needs: one_run
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
if: steps.cache.outputs.cache-hit != 'true'

# build ngx-bootstrap
build:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
- run: npx ng build --runner cloud --prod --with-deps


# run unit tests
unit_tests_with_coverage:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
- run: npm test -- --runner cloud --codeCoverage
- run: npx codecov ./coverage/
continue-on-error: true

# run linting
linting:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- run: npm run lint -- --runner cloud

# firebase deploy preview
firebase_preview:
runs-on: ubuntu-latest
needs: build
outputs:
output_url: ${{ steps.firebase_hosting_preview.outputs.details_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
- 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
channelId: ${{ env.FIREBASE_CHANNEL }}
expires: 7d

# run cypress
e2e_smoke:
name: e2e smoke
runs-on: ubuntu-latest
needs: [install, build, 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
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}

# 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 }}
run: npx nx run ngx-bootstrap-docs-e2e:e2e -c firebase --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 }}
run: npx nx run ngx-bootstrap-docs-e2e:e2e --prod --runner cloud --record --group smoke -- --parallel

e2e_full:
name: e2e full
runs-on: ubuntu-latest
needs: [e2e_smoke]

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
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}

# because of "record" and "parallel" parameters
# these containers will load balance all found tests among themselves
- name: full e2e on firebase
if: ${{ needs.firebase_preview.outputs.output_url }}
continue-on-error: true
run: npx nx run ngx-bootstrap-docs-e2e:e2e -c firebase --runner cloud --cypressConfig ./apps/ngx-bootstrap-docs-e2e/cypress-full.json --record --group full --baseUrl=${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/ -- --parallel

- name: full e2e on local
if: ${{ !needs.firebase_preview.outputs.output_url }}
continue-on-error: true
run: npx nx run ngx-bootstrap-docs-e2e:e2e --prod --runner cloud --cypressConfig ./apps/ngx-bootstrap-docs-e2e/cypress-full.json --record --group full -- --parallel
Loading

0 comments on commit ab0e5fa

Please sign in to comment.