chore: share gh actions logic between workflows
This commit is contained in:
parent
2d9fb7f18a
commit
509dd76b49
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
|
@ -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}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -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 (
|
||||
<SessionSvg
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue