diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index ac803f471..de0de1338 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -30,44 +30,7 @@ jobs: - name: Checkout git repo uses: actions/checkout@v3 - # we stay on v2 even if there is a v3 because the v3 logic is less flexible for our usecase - - name: Install node - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Cache Desktop node_modules - id: cache-desktop-modules - uses: actions/cache@v3 - if: runner.os != 'Windows' - with: - path: node_modules - key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} - - # Not having this will break the windows build because the PATH won't be set by msbuild. - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.3.1 - if: runner.os == 'Windows' - - - name: Setup node for windows - if: runner.os == 'Windows' - run: | - npm install --global yarn node-gyp@latest - - - name: Install Desktop node_modules - if: steps.cache-desktop-modules.outputs.cache-hit != 'true' - run: yarn install --frozen-lockfile --network-timeout 600000 --force - - - name: Generate and concat files - run: yarn build-everything - - - name: Lint Files - # no need to lint files on all platforms. Just do it once on the quicker one - if: runner.os == 'Linux' - run: yarn lint-full - - - name: Unit Test - run: yarn test + - uses: ./actions/setup_and_build - name: Build windows production binaries if: runner.os == 'Windows' diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a5529dccb..4109fb7a5 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -28,36 +28,7 @@ jobs: - name: Checkout git repo uses: actions/checkout@v3 - # we stay on v2 even if there is a v3 because the v3 logic is less flexible for our usecase - - name: Install node - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Cache Desktop node_modules - id: cache-desktop-modules - uses: actions/cache@v3 - if: runner.os != 'Windows' - with: - path: node_modules - key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} - - #Not having this will break the windows build because the PATH won't be set by msbuild. - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.3.1 - if: runner.os == 'Windows' - - - name: Setup node for windows - if: runner.os == 'Windows' - run: | - npm install --global node-gyp@latest - - - name: Install Desktop node_modules - if: steps.cache-desktop-modules.outputs.cache-hit != 'true' - run: yarn install --frozen-lockfile --network-timeout 600000 --force - - - name: Generate and concat files - run: yarn build-everything + - uses: ./actions/setup_and_build - name: Lint Files # no need to lint files on all platforms. Just do it once on the quicker one diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd2dde290..56d993f0b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,44 +22,7 @@ jobs: - name: Checkout git repo uses: actions/checkout@v3 - # we stay on v2 even if there is a v3 because the v3 logic is less flexible for our usecase - - name: Install node - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Cache Desktop node_modules - id: cache-desktop-modules - uses: actions/cache@v3 - if: runner.os != 'Windows' - with: - path: node_modules - key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} - - #Not having this will break the windows build because the PATH won't be set by msbuild. - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.3.1 - if: runner.os == 'Windows' - - - name: Setup node for windows - if: runner.os == 'Windows' - run: | - npm install --global node-gyp@latest - - - name: Install Desktop node_modules - if: steps.cache-desktop-modules.outputs.cache-hit != 'true' - run: yarn install --frozen-lockfile --network-timeout 600000 --force - - - name: Generate and concat files - run: yarn build-everything - - - name: Lint Files - # no need to lint files on all platforms. Just do it once on the quicker one - if: runner.os == 'Linux' - run: yarn lint-full - - - name: Unit Test - run: yarn test + - uses: ./actions/setup_and_build - name: Build windows production binaries if: runner.os == 'Windows' diff --git a/actions/setup_and_build/action.yml b/actions/setup_and_build/action.yml new file mode 100644 index 000000000..a3abd3034 --- /dev/null +++ b/actions/setup_and_build/action.yml @@ -0,0 +1,37 @@ +name: 'Setup and build' +description: 'Setup and build Session Desktop' +runs: + using: 'composite' + steps: + - name: Install node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Cache Desktop node_modules + id: cache-desktop-modules + uses: actions/cache@v3 + if: runner.os != 'Windows' + with: + path: node_modules + key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock', 'patches/**') }} + + # Not having this will break the windows build because the PATH won't be set by msbuild. + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.3.1 + if: runner.os == 'Windows' + + - name: Setup node for windows + if: runner.os == 'Windows' + shell: bash + run: | + yarn global add node-gyp@latest + + - name: Install dependencies + shell: bash + if: steps.cache-desktop-modules.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile --network-timeout 600000 + + - name: Generate and concat files + shell: bash + run: yarn build-everything diff --git a/ts/components/dialog/OnionStatusPathDialog.tsx b/ts/components/dialog/OnionStatusPathDialog.tsx index f44784b66..3d5917922 100644 --- a/ts/components/dialog/OnionStatusPathDialog.tsx +++ b/ts/components/dialog/OnionStatusPathDialog.tsx @@ -25,7 +25,7 @@ export type StatusLightType = { glowStartDelay: number; glowDuration: number; color?: string; - dataTestId?: string + dataTestId?: string; }; const StyledCountry = styled.div` @@ -143,7 +143,7 @@ const OnionPathModalInner = () => { export type OnionNodeStatusLightType = { glowStartDelay: number; glowDuration: number; - dataTestId?: string + dataTestId?: string; }; /** @@ -190,7 +190,7 @@ export const ActionPanelOnionStatusLight = (props: { handleClick: () => void; id: string; }) => { - const { isSelected, handleClick, id } = props; + const { isSelected, handleClick, id } = props; const onionPathsCount = useSelector(getOnionPathsCount); const firstPathLength = useSelector(getFirstOnionPathLength); @@ -219,8 +219,8 @@ export const ActionPanelOnionStatusLight = (props: { glowStartDelay={0} noScale={true} isSelected={isSelected} - dataTestId={"path-light-container"} - dataTestIdIcon={"path-light-svg"} + dataTestId={'path-light-container'} + dataTestIdIcon={'path-light-svg'} id={id} /> ); diff --git a/ts/components/icon/SessionIcon.tsx b/ts/components/icon/SessionIcon.tsx index d2b924ff9..5d00fbb57 100644 --- a/ts/components/icon/SessionIcon.tsx +++ b/ts/components/icon/SessionIcon.tsx @@ -198,9 +198,6 @@ export const SessionIcon = (props: SessionIconProps) => { const iconDimensions = getIconDimensionFromIconSize(iconSize); const iconDef = icons[iconType]; const ratio = iconDef?.ratio || 1; - if (iconType === 'circle') { - console.warn('props', props); - } return (