Skip to content

Commit

Permalink
Merge pull request #187 from etn-ccis/dev
Browse files Browse the repository at this point in the history
BLUI-6371 Master release for showcase demo MUI 6
  • Loading branch information
JeffGreiner-eaton authored Dec 20, 2024
2 parents b111c61 + 933325e commit b067c2e
Show file tree
Hide file tree
Showing 64 changed files with 6,099 additions and 10,987 deletions.
75 changes: 0 additions & 75 deletions .circleci/config.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
parser: '@typescript-eslint/parser',
extends: ['@brightlayer-ui/eslint-config/tsx'],
ignorePatterns: ['dist', '.eslintrc.cjs', 'jest.config.ts', 'vite.config.ts'],
parserOptions: {
project: './tsconfig.json',
},
env: {
browser: true,
jest: true,
},
plugins: ['react-refresh'],
rules: {
'@typescript-eslint/no-empty-function': 'off',
'no-empty-function': 'off',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/blui-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Build

on:
push:
branches: [ "dev", "master" ]
pull_request:
branches: [ "dev", "master" ]
pull_request_target:
types:
- opened
branches:
- '*/*'

permissions:
pull-requests: write
contents: read

jobs:
prettier_lint:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable
- run: yarn prettier
- run: yarn lint

unit_test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable
- run: yarn test --coverage
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./coverage/
files: clover.xml
flags: unittests
name: codecov-report
verbose: true

build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable
- run: yarn build
- name: Save build
uses: actions/upload-artifact@v3
with:
name: dist
if-no-files-found: error
path: dist
8 changes: 4 additions & 4 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: yarn && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_REACT_SHOWCASE }}'
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_REACT_SHOWCASE }}
channelId: live
projectId: blui-react-showcase
14 changes: 9 additions & 5 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
'on': pull_request
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: yarn && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_REACT_SHOWCASE }}'
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_REACT_SHOWCASE }}
expires: 2d
projectId: blui-react-showcase
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# production
/build
/dist

# misc
.DS_Store
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v3.0.0

### Changed

- Updated to latest version of MUI 6, components and themes

## v2.0.0

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# React Showcase Demo

[![](https://img.shields.io/circleci/build/github/etn-ccis/blui-react-showcase-demo/master.svg?style=flat)](https://circleci.com/gh/brightlayer-ui/react-showcase-demo/tree/master) [![codecov](https://codecov.io/gh/etn-ccis/blui-react-showcase-demo/branch/master/graph/badge.svg?token=DNI4Z1LUL3)](https://codecov.io/gh/etn-ccis/blui-react-showcase-demo)
[![Build](https://github.com/etn-ccis/blui-react-showcase-demo/actions/workflows/blui-ci.yml/badge.svg?branch=master)](https://github.com/etn-ccis/blui-react-showcase-demo/actions/workflows/blui-ci.yml) [![codecov](https://codecov.io/gh/etn-ccis/blui-react-showcase-demo/branch/master/graph/badge.svg?token=DNI4Z1LUL3)](https://codecov.io/gh/etn-ccis/blui-react-showcase-demo)

This applications is a demo applications that is used to demonstrate and test various Brightlayer UI components, resources, etc.

Expand Down
24 changes: 14 additions & 10 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"hosting": {
"public": "build",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
19 changes: 19 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<title>react-showcase-demo</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom',
transform: {
'^.+\\.tsx?$': 'ts-jest',
// process `*.tsx` files with `ts-jest`
},
moduleNameMapper: {
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/test/__mocks__/fileMock.js',
},
};
Loading

0 comments on commit b067c2e

Please sign in to comment.