CI/CD, localization fixes & fixed scenario overrides (#1)
* - Removed scenario test overrides * Fixed localization check issue * Added CI/CD configs * Updated README
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
name: 'CI/CD pipeline'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: 'Use Node.js 16.x'
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.x'
|
||||
cache: 'yarn'
|
||||
- run: yarn build
|
||||
|
||||
- name: 'Drop artifacts'
|
||||
uses: actions/upload-artifact@v3.0.0
|
||||
with:
|
||||
name: 'Build'
|
||||
path: 'build'
|
||||
|
||||
- name: SSH Server Deploy
|
||||
uses: kostya-ten/ssh-server-deploy@v4
|
||||
with:
|
||||
host: ezlog.app
|
||||
username: ${{ secrets.prodUser }}
|
||||
password: ${{ secrets.prodPwd }}
|
||||
scp_source: 'build/*'
|
||||
scp_target: '/var/www/demo.ezlog.app/'
|
||||
|
||||
- name: GitHub Release from Tag
|
||||
uses: eloquent/github-release-action@v1
|
||||
@@ -0,0 +1,26 @@
|
||||
name: 'PR validation pipeline'
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: 'Use Node.js 16.x'
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.x'
|
||||
cache: 'yarn'
|
||||
- run: yarn build
|
||||
|
||||
- name: 'Drop artifacts'
|
||||
uses: actions/upload-artifact@v3.0.0
|
||||
with:
|
||||
name: 'Build'
|
||||
path: 'build'
|
||||
@@ -1,51 +1,13 @@
|
||||
# Getting Started with Create React App and Fluent UI
|
||||
# EasyLogon demo application
|
||||
This is a repository for web application, that demonstrates capabilities of [EasyLogon service](https://easylogon.foxdev.studio)
|
||||
|
||||
This is a [Create React App](https://github.com/facebook/create-react-app) based repo that comes with Fluent UI pre-installed!
|
||||
## Production website
|
||||
https://demo.ezlog.app
|
||||
|
||||
## Available Scripts
|
||||
|
||||
In the project directory, you can run:
|
||||
|
||||
### `yarn start`
|
||||
|
||||
Runs the app in the development mode.<br>
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||
|
||||
The page will reload if you make edits.<br>
|
||||
You will also see any lint errors in the console.
|
||||
|
||||
### `yarn test`
|
||||
|
||||
Launches the test runner in the interactive watch mode.<br>
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
|
||||
### `yarn build`
|
||||
|
||||
Builds the app for production to the `build` folder.<br>
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
|
||||
The build is minified and the filenames include the hashes.<br>
|
||||
Your app is ready to be deployed!
|
||||
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
|
||||
### `yarn eject`
|
||||
|
||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
## Learn More
|
||||
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||
|
||||
# Contributing
|
||||
## Contributing
|
||||
1. Clone the repo
|
||||
2. Compile and start debug session with `yarn start`
|
||||
3. Build production-ready bundle with `yarn build`
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
||||
@@ -57,4 +19,4 @@ provided by the bot. You will only need to do this once across all repos using o
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
contact [opensource@foxdev.studio](mailto:opensource@foxdev.studio) with any additional questions or comments.
|
||||
|
||||
@@ -47,7 +47,7 @@ export default class SandboxOne extends React.Component<ISandboxProps, IStates>
|
||||
|
||||
this.setState(newState);
|
||||
|
||||
// if (newState.loginError === null && newState.passwordError === null)
|
||||
if (newState.loginError === null && newState.passwordError === null)
|
||||
this.props.context.current.OnFinished();
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ export default class SandboxThree extends React.Component<ISandboxProps, IStates
|
||||
|
||||
this.setState(newState);
|
||||
|
||||
// if (newState.loginError === null && newState.passwordError === null)
|
||||
if (newState.loginError === null && newState.passwordError === null)
|
||||
this.props.context.current.OnFinished();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class SandboxTwo extends React.Component<ISandboxProps, IStates>
|
||||
|
||||
this.setState(newState);
|
||||
|
||||
// if (newState.loginError === null && newState.passwordError === null)
|
||||
if (newState.loginError === null && newState.passwordError === null)
|
||||
this.props.context.current.OnFinished();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import LocalizedStrings, { LocalizedStringsMethods } from "react-localization";
|
||||
import LocalizedStrings from "react-localization";
|
||||
|
||||
export let Strings = new LocalizedStrings(
|
||||
{
|
||||
|
||||
+4
-3
@@ -30,9 +30,10 @@ function UpdateLocale() : void
|
||||
// CIS countries languages ()
|
||||
let ruLanguages : string[] = [ "ru", "uk", "be", "kk", "ky", "ab", "mo", "my", "uz" ];
|
||||
|
||||
if (window.location.pathname.startsWith("/en"))
|
||||
return;
|
||||
console.log((ruLanguages.includes(navigator.language.substring(0, 2)) || window.location.pathname.startsWith("/ru")) && !window.location.pathname.startsWith("/en"));
|
||||
|
||||
if (ruLanguages.includes(navigator.language.substring(0, 2)) || window.location.pathname.startsWith("/ru"))
|
||||
if ((ruLanguages.includes(navigator.language.substring(0, 2)) || window.location.pathname.startsWith("/ru")) && !window.location.pathname.startsWith("/en"))
|
||||
Strings.setLanguage("ru");
|
||||
else
|
||||
Strings.setLanguage("en");
|
||||
}
|
||||
Reference in New Issue
Block a user