Skip to content

Commit

Permalink
refactorings on client and fix sonarqube problems
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlobu committed Dec 24, 2020
1 parent c5072ca commit 254c6d7
Show file tree
Hide file tree
Showing 141 changed files with 9,918 additions and 5,860 deletions.
46 changes: 6 additions & 40 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,20 @@ jobs:
- name: Check out Git repository
uses: actions/[email protected]

# - name: Install Node.js, NPM and Yarn
# env:
# ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
# uses: actions/[email protected]
# with:
# node-version: 14

# - name: yarn install from npmjs registry
# env:
# ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
# run: |
# npm config set registry https://registry.npmjs.org
# cd app/client
# yarn install --no-lockfile
# cd ..
# yarn install --no-lockfile
# cd ..
# yarn install --no-lockfile

- name: configure app/client for yarn cache
- name: install yarn dependencies in app/client using cache
uses: bahmutov/[email protected]
with:
working-directory: ./app/client

- name: configure project root for yarn cache
- name: install yarn dependencies in ./ using cache
uses: bahmutov/[email protected]
with:
working-directory: ./

- name: ./app/client yarn install
run: yarn install --frozen-lockfile
working-directory: ./app/client
- name: ./ yarn install
run: yarn install --frozen-lockfile
working-directory: ./

# - name: Configure private AWS npm registry and install packages from it
# env:
# ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
# if: ${{ failure() }}
# run: |
# npm config set registry https://packages.deskreen.com/
# npm set //packages.deskreen.com/:_authToken="${{ secrets.NPMRC_USER_TOKEN }}"
# npm config set always-auth true
# cd app/client
# yarn install --frozen-lockfile
# cd ../..
# yarn install --frozen-lockfile
- name: install yarn dependencies in ./app using cache
uses: bahmutov/[email protected]
with:
working-directory: ./app

- name: yarn build
run: yarn build
Expand Down
69 changes: 42 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,52 @@ jobs:
- name: Checkout code
uses: actions/[email protected]

- name: Install Node.js, NPM and Yarn
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
uses: actions/[email protected]
- name: install yarn dependencies in app/client using cache
uses: bahmutov/[email protected]
with:
working-directory: ./app/client

- name: install yarn dependencies in ./ using cache
uses: bahmutov/[email protected]
with:
node-version: 14
working-directory: ./

- name: yarn install from npmjs registry
- name: install yarn dependencies in ./app using cache
uses: bahmutov/[email protected]
with:
working-directory: ./app

- name: yarn build
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
npm config set registry https://registry.npmjs.org
cd app/client
yarn install --no-lockfile
cd ..
yarn install --no-lockfile
cd ..
yarn install --no-lockfile
- name: Configure private AWS npm registry and install packages from it
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn build

- name: yarn lint
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
if: ${{ failure() }}
run: |
npm config set registry https://packages.deskreen.com/
npm set //packages.deskreen.com/:_authToken="${{ secrets.NPMRC_USER_TOKEN }}"
npm config set always-auth true
cd app/client
yarn install --frozen-lockfile
cd ../..
yarn install --frozen-lockfile
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn lint

- name: yarn tsc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn tsc

- name: yarn test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn test

- name: yarn build-ux
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn build-ux

- name: yarn test-ux
uses: GabrielBB/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
run: yarn test-ux

- name: yarn package-ci
env:
Expand Down
39 changes: 11 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,20 @@ jobs:
- name: Check out Git repository
uses: actions/[email protected]

- name: Install Node.js, NPM and Yarn
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
uses: actions/[email protected]
- name: install yarn dependencies in app/client using cache
uses: bahmutov/[email protected]
with:
node-version: 14
working-directory: ./app/client

- name: yarn install from npmjs registry
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
npm config set registry https://registry.npmjs.org
cd app/client
yarn install --no-lockfile
cd ..
yarn install --no-lockfile
cd ..
yarn install --no-lockfile
- name: install yarn dependencies in ./ using cache
uses: bahmutov/[email protected]
with:
working-directory: ./

- name: Configure private AWS npm registry and install packages from it
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
if: ${{ failure() }}
run: |
npm config set registry https://packages.deskreen.com/
npm set //packages.deskreen.com/:_authToken="${{ secrets.NPMRC_USER_TOKEN }}"
npm config set always-auth true
cd app/client
yarn install --frozen-lockfile
cd ../..
yarn install --frozen-lockfile
- name: install yarn dependencies in ./app using cache
uses: bahmutov/[email protected]
with:
working-directory: ./app

# following step does code signing when `electron-builder --publish always` (look in package.json)
- name: yarn package-ci
Expand Down
2 changes: 1 addition & 1 deletion app/api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let protocol;
let port;

if (!host && !protocol && !port) {
host = 'localhost';
host = '127.0.0.1';
protocol = 'http';
port = 3131; // TODO: read port from signaling server api
}
Expand Down
4 changes: 4 additions & 0 deletions app/app.global.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ body
left: -40px !important;
}

div.class-allow-device-to-connect-alert {
z-index: 9999;
}

/* ALLOW CONNECTION ALERT BLINK ANIMATION START */
div.class-allow-device-to-connect-alert
> div.bp3-alert-body
Expand Down
1 change: 1 addition & 0 deletions app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"react-reveal": "^1.2.2",
"react-scripts": "3.4.3",
"react-spinners": "^0.9.0",
"react-test-renderer": "^17.0.1",
"screenfull": "^5.0.2",
"shortid": "^2.2.15",
"socket.io-client": "^2.3.0",
Expand Down
3 changes: 2 additions & 1 deletion app/client/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
sonar.projectKey=deskreen-viewer
sonar.typescript.lcov.reportPaths=coverage/lcov.info
sonar.sources=src
sonar.coverage.exclusions=src/**/*.spec.ts,src/**/*.spec.tsx,src/**/*.test.ts,src/**/*.test.tsx,src/serviceWorker.ts,src/index.tsx
sonar.cpd.exclusions=src/**/mocks/*,src/**/*.spec.ts,src/**/*.spec.tsx,src/**/*.test.ts,src/**/*.test.tsx,src/serviceWorker.ts,src/index.tsx
sonar.coverage.exclusions=src/**/mocks/*,src/**/*.spec.ts,src/**/*.spec.tsx,src/**/*.test.ts,src/**/*.test.tsx,src/serviceWorker.ts,src/index.tsx
sonar.host.url=http://localhost:9000
sonar.login=e3b5f73b8778290f7074c40a4159c32b7f15a8e6
sonar.exclusions=src/serviceWorker.ts,node_modules/**
Loading

0 comments on commit 254c6d7

Please sign in to comment.