Skip to content

Commit

Permalink
Merge pull request #494 from etn-ccis/dev
Browse files Browse the repository at this point in the history
Publish v4.0.0
  • Loading branch information
huayunh authored Oct 4, 2023
2 parents 8cd6134 + 93b5e19 commit 09c01f0
Show file tree
Hide file tree
Showing 332 changed files with 19,120 additions and 12,207 deletions.
176 changes: 83 additions & 93 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
version: 2.1
orbs:
codecov: codecov/[email protected]
gh: circleci/[email protected]
browser-tools: circleci/[email protected]
gh: circleci/[email protected]
browser-tools: circleci/[email protected]

jobs:
build_login_workflow:
working_directory: ~/login-workflow
install_dependencies:
docker:
- image: cimg/node:14.19.0-browsers
- image: cimg/node:18.17.0-browsers
working_directory: ~/login-workflow
resource_class: large
steps:
- checkout
Expand All @@ -24,21 +25,90 @@ jobs:
paths:
- node_modules
key: v2-dependencies-{{ checksum "login-workflow/yarn.lock" }}

prettier_check:
docker:
- image: cimg/node:18.17.0-browsers
working_directory: ~/login-workflow
resource_class: large
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "login-workflow/yarn.lock" }}
- run:
name: Install Dependencies
command: |
cd login-workflow
yarn install --frozen-lockfile
- run:
name: Prettier Check
command: |
cd login-workflow
yarn prettier:check
lint_check:
docker:
- image: cimg/node:18.17.0-browsers
environment:
NODE_OPTIONS=--max-old-space-size=5120
working_directory: ~/login-workflow
resource_class: large
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "login-workflow/yarn.lock" }}
- run:
name: Install Dependencies
command: |
cd login-workflow
yarn install --frozen-lockfile
- run:
name: Lint
command: |
cd login-workflow
yarn lint
store_test_results:
docker:
- image: cimg/node:18.17.0-browsers
parallelism: 4
working_directory: ~/login-workflow
resource_class: large
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "login-workflow/yarn.lock" }}
- run:
name: Install Dependencies
command: |
cd login-workflow
yarn install --frozen-lockfile
- run:
name: Tests
command: |
cd login-workflow
yarn test --maxWorkers=2 --coverage --watchAll=false
yarn test:ci --maxWorkers=2 --coverage --watchAll=false
build_login_workflow:
docker:
- image: cimg/node:18.17.0-browsers
environment:
NODE_OPTIONS=--max-old-space-size=5120
working_directory: ~/login-workflow
resource_class: large
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "login-workflow/yarn.lock" }}
- run:
name: Install Dependencies
command: |
cd login-workflow
yarn install --frozen-lockfile
- run:
name: Build
command: |
Expand All @@ -50,63 +120,10 @@ jobs:
- login-workflow/dist
- login-workflow/coverage

cypress_tests:
working_directory: ~/login-workflow/example
parallelism: 2
docker:
- image: cimg/node:14.19.0-browsers
resource_class: large
steps:
- checkout
- restore_cache:
keys:
- v2-dependencies-{{ checksum "login-workflow/yarn.lock" }}
- restore_cache:
keys:
- v2-dependencies-{{ checksum "login-workflow/example/yarn.lock" }}
- run:
name: Install Dependencies
command: |
cd login-workflow
yarn install --frozen-lockfile
- run:
name: Install Dependencies
command: |
cd login-workflow/example
yarn install --frozen-lockfile
- save_cache:
name: Save Cache
paths:
- ~/.cache
- node_modules
key: v2-dependencies-{{ checksum "login-workflow/yarn.lock" }}
- save_cache:
name: Save Cache
paths:
- ~/.cache
- node_modules
key: v2-dependencies-{{ checksum "login-workflow/example/yarn.lock" }}
- run:
name: Initialize link workflow
command: |
cd login-workflow
yarn cy:stage
- run:
name: Cypress E2E Tests
command: |
cd login-workflow
yarn cytest
- store_artifacts:
path: cypress/screenshots
- persist_to_workspace:
root: .
paths:
- login-workflow/cypress-coverage

coverage_report:
working_directory: ~/login-workflow
docker:
- image: cimg/node:14.19.0-browsers
- image: cimg/node:18.17.0-browsers
steps:
- checkout
- attach_workspace:
Expand All @@ -115,14 +132,10 @@ jobs:
file: './login-workflow/coverage/clover.xml'
flags: unit_tests
token: CODECOV_TOKEN
- codecov/upload:
file: './login-workflow/cypress-coverage/clover.xml'
flags: ui_tests
token: CODECOV_TOKEN

publish_login_workflow:
docker:
- image: cimg/node:14.19.0-browsers
- image: cimg/node:18.17.0-browsers
steps:
- checkout
- attach_workspace:
Expand All @@ -137,30 +150,14 @@ jobs:
command: |
cd login-workflow && yarn publish:package -b $CIRCLE_BRANCH
tag_login_workflow:
docker:
- image: cimg/node:14.19.0-browsers
steps:
- checkout
- gh/setup
- run:
name: Tag @brightlayer-ui/react-auth-workflow
command: |
cd login-workflow && yarn tag:package -b $CIRCLE_BRANCH -s -blui-react-auth-workflow
workflows:
version: 2
react_workflows:
jobs:
- install_dependencies
- prettier_check
- lint_check
- store_test_results
- build_login_workflow
- cypress_tests:
requires:
- build_login_workflow
filters:
branches:
only:
- master
- dev
- publish_login_workflow:
requires:
- build_login_workflow
Expand All @@ -169,18 +166,11 @@ workflows:
only:
- master
- dev
- tag_login_workflow:
requires:
- publish_login_workflow
filters:
branches:
only:
- master
- coverage_report:
requires:
- build_login_workflow
- cypress_tests
filters:
branches:
only:
- master
- dev
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug Report
about: Report a bug with a Brightlayer UI resource
title: ''
labels: 'bug, needs-review, brightlayer-ui'
assignees: ''
---

#### Describe the bug / expected behavior

#### What are the steps to reproduce?

1. Go to...
2. Click on...

#### Screenshots / Screen recording

#### Code snippet / Link to minimum reproduction example

<!-- Please include a minimum code snippet (if relevant) that shows the bug, or link to a codesandbox or other running example where it can be observed -->

```
CODE HERE
```

#### Your environment information

<!-- Describe any relevant environment information (e.g., Operating System, Library version number, browser used, etc.) where the issue was discovered -->

#### Suggested fix

<!-- If you have a suggestion for what might be causing the issue or where to look as a starting point, please mention it here -->

#### Anything else to add?
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature Request
about: Suggest an idea for this resource
title: ''
labels: 'enhancement, needs-review, brightlayer-ui'
assignees: ''
---

#### Describe the desired feature/functionality

#### Additional Context (where / how would this be used)

#### Is this request related to a current issue?

#### Suggested implementation details
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- If this pull request fixes an Issue, link it below. If not, you can remove the line below -->

Fixes # .

<!-- Include a bulleted list summarizing the main changes you have made in this PR -->

#### Changes proposed in this Pull Request:

-
-
-

<!-- Include screenshots if they will help illustrate the changes in this PR -->

#### Screenshots / Screen Recording (if applicable)

-

<!-- Instruction for PR reviewers, if more complicated than a simple yarn start -->

#### To Test:

-

<!-- Useful for draft pull requests -->

#### Any specific feedback you are looking for?

-
38 changes: 19 additions & 19 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/login-workflow"
schedule:
interval: "weekly"
day: "wednesday"
open-pull-requests-limit: 1
target-branch: "dev"
labels:
- "external-dependency"
- package-ecosystem: "npm"
directory: "/login-workflow/example"
schedule:
interval: "weekly"
day: "wednesday"
open-pull-requests-limit: 1
target-branch: "dev"
labels:
- "external-dependency"
- package-ecosystem: 'npm'
directory: '/login-workflow'
schedule:
interval: 'monthly'
day: 'wednesday'
open-pull-requests-limit: 1
target-branch: 'dev'
labels:
- 'external-dependency'

- package-ecosystem: 'npm'
directory: '/login-workflow/example'
schedule:
interval: 'monthly'
day: 'wednesday'
open-pull-requests-limit: 1
target-branch: 'dev'
labels:
- 'external-dependency'
2 changes: 0 additions & 2 deletions .github/pr-labeler.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/blui-pr-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: blui-pr-actions
on:
pull_request_target:
types:
- opened

permissions:
pull-requests: write
contents: read

jobs:
pr-labels:
uses: etn-ccis/blui-automation/.github/workflows/blui-labels.yml@dev
secrets: inherit

pr-comment:
uses: etn-ccis/blui-automation/.github/workflows/blui-comment.yml@dev
secrets: inherit
Loading

0 comments on commit 09c01f0

Please sign in to comment.