Skip to content

Commit

Permalink
[Process][Testing]: First production deployment (#6)
Browse files Browse the repository at this point in the history
* [Persistent storage]: Adding zustand localstorage persist

* [Setup]: Adding chakra ui to the project

* [Setup]: Add modal support in the project with search modal (#3)

* [Setup]: Adding staged test run script (#4)

* [Process]: Add FTP deploy job in the project (#5)

* [Fixing jobs]: Adding prod branch to the build job (#7)
  • Loading branch information
onemanfighter authored May 23, 2024
1 parent 4993dae commit 7cf4f5f
Show file tree
Hide file tree
Showing 55 changed files with 32,461 additions and 1,867 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
run: yarn install
- name: Build
run: yarn build --if-present
# - name: 📂 Sync files
# uses: SamKirkland/FTP-Deploy-Action@v4.3.5
# with:
# server: ftp.telegramonic.com
# username: u392139545.github_deploy
# password: ${{ secrets.HOSTINGER_FTP_PASSWORD }}
# local-dir: ./build/
# server-dir: ./
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.MAC_AMITRAIKWAR_FTP_SERVER }}
username: ${{ secrets.MAC_AMITRAIKWAR_FTP_ACCOUNT }}
password: ${{ secrets.MAC_AMITRAIKWAR_FTP_PASSWORD }}
local-dir: ./build/
server-dir: ./
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build

on:
push:
branches: ['main']
branches: ['development', 'production']
pull_request:
branches: ['main']
branches: ['development', 'production']

jobs:
build_test_lint:
Expand Down
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
yarn lint:staged
yarn prettier:staged
chmod +x scripts/run-staged-tests.sh
yarn run-staged-tests
2 changes: 2 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const path = require('path');
module.exports = {
webpack: {
alias: {
'@components': path.resolve(__dirname, './src/components'),
'@providers': path.resolve(__dirname, './src/providers'),
'@localization': path.resolve(__dirname, './src/localization'),
'@store': path.resolve(__dirname, './src/store'),
'@store/slice': path.resolve(__dirname, './src/store/slice'),
Expand Down
32 changes: 21 additions & 11 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ module.exports = {
setupFilesAfterEnv: ['<rootDir>/jest.js'],
roots: ['./'],
testEnvironment: 'jsdom',
collectCoverageFrom: ['src/*.tsx', 'src/**/*.tsx'],
collectCoverageFrom: [
'src/**/*.ts',
'src/**/*.tsx',
// exclude files from coverage
'!src/**/index.ts',
'!src/**/index.tsx',
'!src/**/App.tsx',
'!src/**/react-app-env.d.ts',
'!src/**/reportWebVitals.ts',
'!src/**/setupTests.ts',
],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
Expand All @@ -17,21 +27,21 @@ module.exports = {
'@store/slice': '<rootDir>/src/store/slice',
'@store': '<rootDir>/src/store',
'@selectors': '<rootDir>/src/store/selectors',
// '@components': '<rootDir>/src/components',
'@components': '<rootDir>/src/components',
'@localization': '<rootDir>/src/localization',
// '@providers': '<rootDir>/src/providers',
'@providers': '<rootDir>/src/providers',
// '@router': '<rootDir>/src/router',
},
transform: {
'.+\\.(css|scss|png|jpg|svg)$': 'jest-transform-stub',
'^.+\\.(js|jsx|ts|tsx)$': 'ts-jest',
},
// coverageThreshold: {
// global: {
// branches: 80,
// functions: 80,
// lines: 80,
// statements: -10,
// },
// },
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: -10,
},
},
};
Loading

0 comments on commit 7cf4f5f

Please sign in to comment.