Skip to content

Commit

Permalink
Merge branch 'development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
lexasq authored Jul 4, 2024
2 parents a6bf9fc + b1b1f54 commit b25b421
Show file tree
Hide file tree
Showing 319 changed files with 35,913 additions and 30,557 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
30 changes: 20 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,48 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"rules": {
},
"plugins": ["@nx"],
"rules": {},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"excludedFiles": ["*.spec.ts"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] }
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"parserOptions": { "project": "./tsconfig.*?.json" },
"extends": ["plugin:@nx/typescript"],
"parserOptions": {
"project": "./tsconfig.*?.json"
},
"rules": {
"semi": "off",
"@typescript-eslint/semi": ["error"]
"@typescript-eslint/semi": ["error"],
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
"extends": ["plugin:@nx/javascript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
}
]
}
38 changes: 38 additions & 0 deletions .github/workflows/on-gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: on-gh-release
on:
release:
types: [released]
branches:
- development

env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
MOZ_HEADLESS: 1
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
# one run
one_run:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

# update npm tags
npm_tag_update:
runs-on: ubuntu-latest
needs: one_run
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
- run: |
npm config set registry https://registry.npmjs.org/
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npm dist-tag add ngx-bootstrap@${{ steps.package-version.outputs.current-version}} latest
104 changes: 57 additions & 47 deletions .github/workflows/on-push-or-pull.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: on-pull-request-or-push

on:
workflow_dispatch:
pull_request:
push:
branches:
Expand All @@ -13,9 +14,8 @@ env:
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] }}
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 0

CACHE_NODE_MODULES_PATH: |
~/.npm
Expand All @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -38,8 +38,8 @@ jobs:
runs-on: ubuntu-latest
needs: one_run
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
Expand All @@ -52,35 +52,35 @@ jobs:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
- run: |
npx nx build ngx-bootstrap --runner cloud --configuration production
npx nx build --runner cloud --configuration production
npx nx build ngx-bootstrap --runner=cloud --configuration=production
npx nx build --runner=cloud --configuration=production
# run unit tests
unit_tests_with_coverage:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
- run: npm test -- --runner cloud --codeCoverage
- run: npm test -- --runner=cloud --codeCoverage
- run: npx codecov ./coverage/
continue-on-error: true

Expand All @@ -89,12 +89,12 @@ jobs:
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- run: npm run lint -- --runner cloud
- run: npm run lint -- --runner=cloud

# firebase deploy preview
firebase_preview:
Expand All @@ -103,8 +103,8 @@ jobs:
outputs:
output_url: ${{ steps.firebase_hosting_preview.outputs.details_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
Expand All @@ -118,75 +118,85 @@ jobs:
channelId: ${{ env.FIREBASE_CHANNEL }}
expires: 7d

# run cypress
# run playwright
e2e_smoke:
name: e2e smoke
name: e2e smoke (${{ matrix.shard }}/${{ strategy.job-total }})
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]
shard: [1, 2]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
- uses: actions/cache@v3
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: Install playwright browsers
run: |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npx playwright install
npx playwright install-deps chromium
- name: smoke e2e on firebase
if: ${{ needs.firebase_preview.outputs.output_url }}
run: npx nx run ngx-bootstrap-docs-e2e:e2e -- --configuration firebase --runner cloud --record --group smoke --baseUrl=${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/ --parallel
run: PLAYWRIGHT_TEST_BASE_URL="${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/" npx nx run ngx-bootstrap-docs-e2e:e2e --pwProject=chromium-integration --skipServe --shard=${{ matrix.shard }}/${{ strategy.job-total }}

- name: smoke e2e local
if: ${{ !needs.firebase_preview.outputs.output_url }}
run: npx nx run ngx-bootstrap-docs-e2e:e2e -- --configuration production --runner cloud --record --group smoke --parallel
run: npx nx run ngx-bootstrap-docs-e2e:e2e --pwProject=chromium-integration --shard=${{ matrix.shard }}/${{ strategy.job-total }}

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report-smoke-${{ matrix.shard }}_${{ strategy.job-total }}
path: apps/ngx-bootstrap-docs-e2e/playwright-report
retention-days: 14

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]
shard: [1, 2]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
- uses: actions/cache@v3
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: Install playwright browsers
run: |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npx playwright install
npx playwright install-deps chromium
- 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 -- --configuration 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
run: npx nx run ngx-bootstrap-docs-e2e:e2e --pwProject=chromium-full --baseUrl=${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/ --skipServe --shard=${{ matrix.shard }}/${{ strategy.job-total }}

- 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 -- --configuration production --runner cloud --cypressConfig ./apps/ngx-bootstrap-docs-e2e/cypress-full.json --record --group full --parallel
run: npx nx run ngx-bootstrap-docs-e2e:e2e --pwProject=chromium-full --shard=${{ matrix.shard }}/${{ strategy.job-total }}

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report-full-${{ matrix.shard }}_${{ strategy.job-total }}
path: apps/ngx-bootstrap-docs-e2e/playwright-report
retention-days: 14
Loading

0 comments on commit b25b421

Please sign in to comment.